fix(infra): envsubst filter as |-regex; test placeholder as resolvable IP

Run 3 failed at the test step: nginx's official entrypoint matches NGINX_ENVSUBST_FILTER as a regex against variable names (^filter$), so the comma form GITEA_TOKEN,GITEA_CONTENTS_API matched nothing — ${…} tokens stayed in the rendered config and nginx -t failed with 'unknown "gitea_contents_api" variable'. A literal hostname in proxy_pass is resolved during the config test, so the test placeholder must be a resolvable literal IP. Both reproduced and fixed locally against the repo files: the exact test-step container now passes nginx -t (exit 0). compose.yaml + deploy-infra.yml use GITEA_TOKEN|GITEA_CONTENTS_API (quoted in the shell script) and http://127.0.0.1:1. Spec rev.8: status line, D11, §4 sketch + resolved note, rows 2/4.
This commit is contained in:
dong.nguyen committed 2026-10-23 23:59:32 +07:00
1 parent 773000a42a
commit a5a525ff14
3 files changed
+18 -13

No files matched your search

+2 -2
View File
@@ -77,8 +77,8 @@ jobs:
-v "$PWD/nginx.conf:/etc/nginx/templates/default.conf.template:ro" \
-v "$PWD/deploy/htpasswd:/etc/nginx/htpasswd:ro" \
-e GITEA_TOKEN=placeholder \
-e GITEA_CONTENTS_API=http://placeholder \
-e NGINX_ENVSUBST_FILTER=GITEA_TOKEN,GITEA_CONTENTS_API \
-e GITEA_CONTENTS_API=http://127.0.0.1:1 \
-e 'NGINX_ENVSUBST_FILTER=GITEA_TOKEN|GITEA_CONTENTS_API' \
nginx:alpine nginx -t
# Apply + verify (D4): recreate is the same command the Dockge deploy