From 6d8a5b1ca821007717813a55b36f1d054c031249 Mon Sep 17 00:00:00 2001 From: Xander Smeets Date: Tue, 7 Apr 2026 13:21:35 +0200 Subject: [PATCH 1/3] chore: allow configuring fastcgi_pass through environment variable --- nginx.conf.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx.conf.template b/nginx.conf.template index b701a04..328769e 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:-phpfpm:9000}; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_split_path_info ^(.+?\.php)(/.*)$; From 669c5c98d65c574ca9ca930868ea50a1f53a2571 Mon Sep 17 00:00:00 2001 From: Xander Smeets Date: Tue, 7 Apr 2026 13:24:35 +0200 Subject: [PATCH 2/3] fix: envsubst syntax --- Dockerfile | 1 + nginx.conf.template | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7f60882..c3eb3bd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,6 +20,7 @@ EXPOSE 9000 FROM nginx:alpine AS nginx COPY nginx.conf.template /nginx.conf.template COPY --from=builder /var/www/html /var/www/html +ENV FASTCGI_PASS=phpfpm:9000 CMD ["/bin/sh" , "-c" , "envsubst '${SERVER_NAME}' < /nginx.conf.template > /etc/nginx/nginx.conf && exec nginx -g 'daemon off;'"] EXPOSE 8080 diff --git a/nginx.conf.template b/nginx.conf.template index 328769e..8166997 100644 --- a/nginx.conf.template +++ b/nginx.conf.template @@ -47,7 +47,7 @@ http { alias /var/www/html/public; location ~ \.php(/|$) { - fastcgi_pass ${FASTCGI_PASS:-phpfpm:9000}; + fastcgi_pass ${FASTCGI_PASS}; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_split_path_info ^(.+?\.php)(/.*)$; From b25b28c5b346bae479188c76c480d5c7691af5a3 Mon Sep 17 00:00:00 2001 From: Xander Smeets Date: Tue, 7 Apr 2026 13:27:37 +0200 Subject: [PATCH 3/3] fix: substitute FASTCGI_PASS as well Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c3eb3bd..54aa46c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,7 @@ FROM nginx:alpine AS nginx COPY nginx.conf.template /nginx.conf.template COPY --from=builder /var/www/html /var/www/html ENV FASTCGI_PASS=phpfpm:9000 -CMD ["/bin/sh" , "-c" , "envsubst '${SERVER_NAME}' < /nginx.conf.template > /etc/nginx/nginx.conf && exec nginx -g 'daemon off;'"] +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