feat: 生产部署接入 TAC 验证码(JWT_SECRET + WireGuard upstream + 反代健康检查)

This commit is contained in:
Sisyphus committed 2026-08-25 22:41:25 +08:00
1 parent 7182e46ee4
commit c05339e21c
3 files changed
+25 -4

No files matched your search

+7 -2
View File
@@ -35,8 +35,13 @@ RUN npm run build
# ── 第二阶段:Nginx 运行 ──
FROM nginx:1.27-alpine
# 复制 nginx 配置
COPY nginx.conf /etc/nginx/conf.d/default.conf
# 验证码平台 upstream 默认值(公网 IP,测试环境/外部部署直接可用);
# 生产 deploy-prod.yml 用 -e CAPTCHA_UPSTREAM=10.9.0.2:18200 覆盖为 WireGuard 内网
ENV CAPTCHA_UPSTREAM=38.76.218.110:18200
# 以模板方式挂载:nginx 镜像入口启动时用 envsubst 渲染 ${CAPTCHA_UPSTREAM} 后
# 生成 /etc/nginx/conf.d/default.conf(官方镜像 /docker-entrypoint.d/20-envsubst-on-templates.sh)
COPY nginx.conf /etc/nginx/templates/default.conf.template
# 复制构建产物(dist/ 含 index.html + assets/)到 nginx 根目录
COPY --from=build /app/dist /usr/share/nginx/html