Files
pk-lab-xhs/Dockerfile
T
codex-bot 3dfd887a0c
Verify mini program and deploy preview / verify-deploy (push) Successful in 24s
Route preview API through Docker network
2026-09-18 22:52:25 +08:00

7 lines
380 B
Docker

FROM nginx:1.27-alpine
COPY web /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 8080
HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=5 CMD wget -q -O- http://127.0.0.1:8080/health || exit 1
CMD ["/bin/sh", "-c", "envsubst '$API_BASE_URL' < /usr/share/nginx/html/runtime-env.js > /tmp/runtime-env.js && exec nginx -g 'daemon off;'"]