From c59bdcf77c50cbe89b4a93782cdd6d9e7532080e Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 2 Dec 2019 15:58:07 +0100 Subject: basic php server --- Dockerfile | 13 ++++++------- srcs/conf/test.com | 4 ++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index fbaa661..6e6beb0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,13 @@ FROM debian:buster RUN apt update && \ - apt install -y nginx && \ - apt install -y mariadb-server && \ - apt install -y php-fpm php-mysql + apt install -y nginx mariadb-server php-fpm php-mysql COPY srcs/pages /var/www/html COPY srcs/conf /etc/nginx/sites-available/ -RUN ln -s /etc/nginx/sites-available/test.com /etc/nginx/sites-enabled/ - # service nginx start +RUN ln -fs /etc/nginx/sites-available/test.com /etc/nginx/sites-enabled/default EXPOSE 80 -# STOPSIGNAL SIGTERM -CMD ["nginx", "-g", "daemon off;"] +CMD service nginx start && \ + service mysql start && \ + service php7.3-fpm start && \ + sleep infinity & wait diff --git a/srcs/conf/test.com b/srcs/conf/test.com index cf734e1..2331b3b 100644 --- a/srcs/conf/test.com +++ b/srcs/conf/test.com @@ -1,7 +1,7 @@ server { listen 80; root /var/www/html; - index index.php; + index index.php index.html index.htm index.nginx-debian.html; server_name test.com; location / { @@ -11,7 +11,7 @@ server { location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass - unix:/var/run/php/php7.2-fpm.sock; + unix:/var/run/php/php7.3-fpm.sock; } location ~ /\.ht { -- cgit