Files
project57-x/Dockerfile
T
mdszxy 5dc62bd7c4
CI Pipeline / check-commit (push) Successful in 5s
CI Pipeline / deploy-only (push) Has been skipped
CI Pipeline / build (push) Successful in 21s
CI Pipeline / deploy (push) Successful in 17s
fix: start nginx without resolving A-site at boot [deploy]
2026-10-05 20:16:16 +08:00

14 lines
572 B
Docker

# CI 中先 pnpm build 产出 dist/;运行时由 nginx 托管,并把 /embed /images /api/contact 反代到 A 站
FROM nginx:1.27-alpine
ENV A_UPSTREAM=http://project57-deploy.ns-project57.svc.cluster.local:3000
# 不走 templates/envsubst,避免把 nginx 的 $host/$uri 清空
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY docker-entrypoint.d/40-a-upstream.sh /docker-entrypoint.d/40-a-upstream.sh
RUN sed -i 's/\r$//' /docker-entrypoint.d/40-a-upstream.sh \
&& chmod 0755 /docker-entrypoint.d/40-a-upstream.sh
COPY dist /usr/share/nginx/html
EXPOSE 3000