configurable nginx port

This commit is contained in:
Robin 2022-03-10 13:53:35 +01:00
parent 67a19a8cd9
commit 837a6e4485
3 changed files with 7 additions and 2 deletions

View File

@ -1,6 +1,7 @@
FROM nginx:alpine
ENV PHP_FPM="php:9000"
ENV PHP_FPM="php:9000" \
NGINX_PORT="80"
RUN find /etc/nginx -type f -not -name 'mime.types' -not -name 'fastcgi_params' -delete && \
rm -rf conf.d modules

View File

@ -10,4 +10,8 @@ set \$upstream "${PHP_FPM}";
fastcgi_pass \$upstream;
EOL
cat > /tmp/listen.conf << EOL
listen ${NGINX_PORT} default_server;
EOL
exec nginx -g "daemon off;"

View File

@ -22,7 +22,7 @@ http {
resolver 127.0.0.11 valid=10s;
server {
listen 80 default_server;
include /tmp/listen.conf;
server_name _;
index index.php index.html;