diff --git a/Dockerfile b/Dockerfile index 7f60882..54aa46c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,8 @@ EXPOSE 9000 FROM nginx:alpine AS nginx COPY nginx.conf.template /nginx.conf.template COPY --from=builder /var/www/html /var/www/html -CMD ["/bin/sh" , "-c" , "envsubst '${SERVER_NAME}' < /nginx.conf.template > /etc/nginx/nginx.conf && exec nginx -g 'daemon off;'"] +ENV FASTCGI_PASS=phpfpm:9000 +CMD ["/bin/sh" , "-c" , "envsubst '${SERVER_NAME} ${FASTCGI_PASS}' < /nginx.conf.template > /etc/nginx/nginx.conf && exec nginx -g 'daemon off;'"] EXPOSE 8080 FROM phpfpm AS php-adfsmfa diff --git a/nginx.conf.template b/nginx.conf.template index b701a04..8166997 100644 --- a/nginx.conf.template +++ b/nginx.conf.template @@ -47,7 +47,7 @@ http { alias /var/www/html/public; location ~ \.php(/|$) { - fastcgi_pass phpfpm:9000; + fastcgi_pass ${FASTCGI_PASS}; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_split_path_info ^(.+?\.php)(/.*)$;