Files
rice-pk-xhs/Dockerfile
T
codex-bot e99a2bb4d4
Verify mini program and deploy preview / verify-deploy (push) Failing after 32s
feat: launch PK testing application
2026-09-18 21:50:25 +08:00

8 lines
647 B
Docker

FROM nginx:1.27-alpine
COPY web /usr/share/nginx/html
RUN printf 'server { listen 8080; server_name _; root /usr/share/nginx/html; location = /runtime-env.js { alias /tmp/runtime-env.js; } location / { try_files $uri $uri/ /index.html; } location = /health { access_log off; return 200 "ok\\n"; add_header Content-Type text/plain; } }' > /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;'"]