mirror of
https://github.com/dong-nz/cv.git
synced 2026-11-23 00:20:40 +07:00
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:
1 parent
773000a42a
commit
a5a525ff14
3 files changed
+18
-13
No files matched your search
+7
-3
@@ -13,9 +13,13 @@ services:
|
||||
# daemonizes and the container exits.
|
||||
entrypoint: ["sh", "-c", ". /run/secrets/site_config && exec /docker-entrypoint.sh \"$$@\""]
|
||||
environment:
|
||||
# Names the variables the template renderer substitutes, so $uri/$host
|
||||
# stay nginx runtime variables. The filter itself is not sensitive.
|
||||
NGINX_ENVSUBST_FILTER: GITEA_TOKEN,GITEA_CONTENTS_API
|
||||
# Names the variables the template renderer substitutes. The filter is a
|
||||
# REGEX the official entrypoint matches against each variable name
|
||||
# (`t ~ /^(filter)$/`) — alternatives MUST be separated with |, a comma
|
||||
# matches nothing and leaves ${…} in the rendered config (nginx -t then
|
||||
# fails: unknown "gitea_contents_api" variable — reproduced 2026-10-23).
|
||||
# $uri/$host stay nginx runtime variables. The filter is not sensitive.
|
||||
NGINX_ENVSUBST_FILTER: GITEA_TOKEN|GITEA_CONTENTS_API
|
||||
volumes:
|
||||
- ./dist:/usr/share/nginx/html:ro
|
||||
# Mounted as a template: the image's envsubst step renders it to
|
||||
|
||||
Reference in new issue
Block a user