diff --git a/scripts/database/checkDbStatus.sh b/database/checkDbStatus.sh similarity index 100% rename from scripts/database/checkDbStatus.sh rename to database/checkDbStatus.sh diff --git a/scripts/dockerInstall.sh b/dockerInstall.sh similarity index 100% rename from scripts/dockerInstall.sh rename to dockerInstall.sh diff --git a/eksempelHtml.html b/oblig1/eksempelHtml.html similarity index 100% rename from eksempelHtml.html rename to oblig1/eksempelHtml.html diff --git a/webserver/Dockerfile b/webserver/Dockerfile index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..18ced13c0d85d6fc1c76e41ffa8e635b7f796e5f 100644 --- a/webserver/Dockerfile +++ b/webserver/Dockerfile @@ -0,0 +1,32 @@ +FROM ubuntu:22.04 +MAINTAINER raphaesl@stud.ntnu.no +MAINTAINER saraslu@stud.ntnu.no + +ENV DEBIAN_FRONTEND=noninteractive + +# Install Apache +RUN apt-get update && apt-get install -y apache2 libapache2-mod-php php-pgsql net-tools + +# Download needed repositories +RUN mkdir temp +RUN git clone https://github.com/hioa-cs/bookface.git +RUN git clone https://gitlab.stud.idi.ntnu.no/raphaesl/dcsg2003 + +# Configure files for apache +RUN rm /var/www/html/index.html +RUN mkdir /var/www/html/images + +# Move bookface repo to apache +ADD temp/bookface/code/* /var/www/html/ +ADD temp/bookface/init.sh / + +# Move group repo to apache +ADD temp/dcsg2003/webserver/config.php /var/www/html + +# Delete trash +RUN rm -r temp + +# Misc +EXPOSE 80 +ENTRYPOINT ["/usr/sbin/apache2ctl","-D","FOREGROUND","-k","start"] + diff --git a/webserver/config.php b/webserver/config.php index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..997fcfb221ccc4c00694442e3b93b75780af0fab 100644 --- a/webserver/config.php +++ b/webserver/config.php @@ -0,0 +1,10 @@ +<?php +$dbhost = "192.168.130.246"; +$dbport = "26257"; +$db = "bf"; +$dbuser = "AETAadmin"; +$dbpassw = ''; +$webhost = '10.212.169.121'; +$weburl = 'http://' . $webhost ; +$frontpage_limit = "500"; +?> \ No newline at end of file