From ad02eace1c18ba9084ed9eac14da7d3f60858199 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Sat, 19 Oct 2019 15:23:31 -0400 Subject: [PATCH] Added basic setup for PHP; HTML file for testing added --- Dockerfile | 5 +++++ etc/nginx/conf.d/default.conf | 16 ++++++++++++++++ var/www/indes.html | 9 +++++++++ 3 files changed, 30 insertions(+) create mode 100644 etc/nginx/conf.d/default.conf create mode 100644 var/www/indes.html diff --git a/Dockerfile b/Dockerfile index f595971..af8b34a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,11 +9,16 @@ RUN apt-get update && apt-get install -y \ php-fpm \ && rm -rf /var/lib/apt/lists/* +# Setting up PHP +COPY /etc/* /etc/ + # Setting up MySQL --Will come back to later, as it's not necessary and not playing very well with automation #RUN mysql_secure_installation --use-defaults COPY /entrypoint.sh / +COPY /var/www/* /var/www/ + # Expose Insecure Web, MySQL Server EXPOSE 80 3306 CMD ["/bin/sh", "/entrypoint.sh"] \ No newline at end of file diff --git a/etc/nginx/conf.d/default.conf b/etc/nginx/conf.d/default.conf new file mode 100644 index 0000000..f5ea75c --- /dev/null +++ b/etc/nginx/conf.d/default.conf @@ -0,0 +1,16 @@ +server { + listen 80; + listen [::]:80; + + root /var/www; + index index.html; + server_name _; + + access_log /var/log/nginx/access.log; + error_log /var/log/nginx/error.log; + + location ~ \.php$ { + include snippets/fastcgi-php.conf; + fastcgi_pass unix:/run/php/php7.2-fpm.sock; + } +} \ No newline at end of file diff --git a/var/www/indes.html b/var/www/indes.html new file mode 100644 index 0000000..821dcf2 --- /dev/null +++ b/var/www/indes.html @@ -0,0 +1,9 @@ + + + + Test Page + + +

Test Page

+ + \ No newline at end of file