fix: keep nginx vars when envsubst fills A_UPSTREAM [deploy]
CI Pipeline / check-commit (push) Successful in 5s
CI Pipeline / deploy-only (push) Has been skipped
CI Pipeline / build (push) Successful in 24s
CI Pipeline / deploy (push) Failing after 3m1s

This commit is contained in:
mdszxy committed 2026-10-05 20:08:33 +08:00
1 parent c0f6aeb336
commit 9d5ea0b393
1 file changed
+2
+2
View File
@@ -3,6 +3,8 @@ FROM nginx:1.27-alpine
# 集群内 A 站地址,可被 K8s env 覆盖
ENV A_UPSTREAM=http://project57-deploy.ns-project57.svc.cluster.local:3000
# 只替换 A_UPSTREAM,避免 envsubst 把 nginx 的 $host/$uri 等变量清空导致容器起不来
ENV NGINX_ENVSUBST_FILTER=A_UPSTREAM
COPY nginx.conf /etc/nginx/templates/default.conf.template
COPY dist /usr/share/nginx/html