From c515981236064278bfa35f959030600836722629 Mon Sep 17 00:00:00 2001 From: Albert Armea Date: Sat, 21 Mar 2026 20:06:57 +0000 Subject: [PATCH] Fix nginx template substitution --- nginx/Dockerfile | 5 +++++ nginx/{conf.d/git.conf => templates/git.conf.template} | 1 + 2 files changed, 6 insertions(+) rename nginx/{conf.d/git.conf => templates/git.conf.template} (99%) diff --git a/nginx/Dockerfile b/nginx/Dockerfile index 6fe4f59..d821ab9 100644 --- a/nginx/Dockerfile +++ b/nginx/Dockerfile @@ -50,6 +50,11 @@ COPY --from=builder \ # Main nginx config (loads the dynamic module at the top level) COPY nginx.conf /etc/nginx/nginx.conf +# Virtual host template — the nginx Docker entrypoint runs envsubst on +# /etc/nginx/templates/*.template and writes the results to /etc/nginx/conf.d/ +# automatically on container start, substituting any $VAR or ${VAR} present. +COPY templates/git.conf.template /etc/nginx/templates/git.conf.template + # GeoIP map directory (populated by geoblock_watcher at runtime) RUN mkdir -p /etc/nginx/geoblock diff --git a/nginx/conf.d/git.conf b/nginx/templates/git.conf.template similarity index 99% rename from nginx/conf.d/git.conf rename to nginx/templates/git.conf.template index e74c84e..ea5c769 100644 --- a/nginx/conf.d/git.conf +++ b/nginx/templates/git.conf.template @@ -54,3 +54,4 @@ server { proxy_send_timeout 600s; } } +