Files
xiaoxia-saas/infra/docker
xiaoxia fa65a401a5
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 2s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 2s
CI/CD Pipeline / PR Build API Image (pull_request) Failing after 23s
CI/CD Pipeline / PR Build Worker Image (pull_request) Failing after 23s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 56s
CI/CD Pipeline / Validate - Style (pull_request) Successful in 1m26s
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Successful in 1m27s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 1m47s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 2m44s
CI/CD Pipeline / Validate - Security (pull_request) Successful in 5m13s
AI Code Review / AI Code Review (pull_request) Successful in 6m17s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 6m41s
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / CI Gate (pull_request) Failing after 2s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 4m9s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 126h33m42s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 126h33m43s
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Failing after 126h40m16s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 126h40m21s
CI/CD Pipeline / PR Build Web Image (pull_request) Failing after 126h40m10s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 126h40m11s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 126h39m53s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 126h39m59s
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Failing after 126h40m3s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Failing after 126h40m4s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 126h40m8s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 126h40m8s
CI/CD Pipeline / Check push changed paths (pull_request) Failing after 126h40m15s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 126h39m53s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 126h33m30s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 126h33m30s
CI/CD Pipeline / Canary Release to Production (pull_request) Failing after 126h33m29s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 126h39m53s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Failing after 126h40m10s
fix(web): bake all nginx configs into image, select via APP_ENV at runtime
Problem: web Dockerfile used ARG NGINX_CONF to bake a single nginx config
at build time. CI always built from develop branch with nginx-staging.conf,
so the production image also contained the staging nginx config pointing to
xiaoxia-api-staging:8000, causing 502 in production after restarts.

Fix:
- Bake all 3 nginx configs (default/nginx.conf, nginx-staging.conf,
  nginx-production.conf) into the web image
- Add nginx-entrypoint.sh that symlinks the correct config based on
  APP_ENV (staging/production) at container startup
- Remove NGINX_CONF build arg from CI pipeline (3 occurrences)
- Update deploy scripts to pass APP_ENV to web container
- Update compose.yml to use APP_ENV instead of NGINX_ENV

This ensures a single image artifact works for both staging and production,
with the correct nginx upstream selected at runtime via environment variable.
2026-09-11 08:43:07 +08:00
..