develop
8 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
2ce3a5efd3 |
fix: SPA 路由回退的 HTML 补 no-cache 头(配合 #1732 白屏修复) (#1735)
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 2s
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / Check push changed paths (push) Successful in 8s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 46s
CI/CD Pipeline / Build Staging API Image (push) Successful in 49s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 49s
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 1m57s
AI Code Review / AI Code Review (pull_request) Successful in 2m6s
CI/CD Pipeline / Validate - Style (push) Successful in 2m16s
CI/CD Pipeline / Integration Tests (push) Successful in 2m23s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m19s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 1m9s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m41s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 1m30s
CI/CD Pipeline / Validate - Security (push) Successful in 5m13s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 2m41s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 5m35s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 3m28s
CI/CD Pipeline / Unit Tests (push) Successful in 8m25s
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / CI Gate (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Canary Release to Production (push) Has been skipped
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 6s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 4s
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Successful in 1m56s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Successful in 1m41s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 31s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 29s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 2m34s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 2m36s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 35s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Validate - Style (pull_request) Successful in 3m18s
CI/CD Pipeline / Validate - Security (pull_request) Successful in 5m31s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 10m18s
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / CI Gate (pull_request) Successful in 2s
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 12m15s
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
Co-authored-by: xiaoxia <dev@xiaoxiajianji.com> Co-committed-by: xiaoxia <dev@xiaoxiajianji.com> |
||
|
|
df38778875 |
fix: 禁止浏览器缓存 index.html,防止部署后旧 chunk 引用导致白屏
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 33s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 41s
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 54s
AI Code Review / AI Code Review (pull_request) Successful in 1m18s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 1m23s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 1m53s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 1m52s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 1m53s
CI/CD Pipeline / Validate - Code Quality (pull_request) Successful in 3m17s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m31s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 1m15s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 6m50s
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / CI Gate (pull_request) Successful in 6s
ACR Cleanup / ACR Image Cleanup (pull_request_target) Successful in 55s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 1m20s
- nginx.conf 和 nginx-staging.conf 新增 location = /index.html 精确匹配块 - 设置 Cache-Control: no-cache, no-store, must-revalidate - 设置 Pragma: no-cache 和 expires 0 - 确保每次部署后浏览器获取最新的 index.html(含新 chunk hash) |
||
|
|
efb9d6c57f |
fix: nginx SPA路由移除$uri/,避免/assets等路径被当成静态目录返回403
Deploy / Staging E2E Tests (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 115h22m58s
CI/CD Pipeline / Frontend Lint (push) Failing after 115h23m32s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 115h23m32s
问题根因: - try_files $uri $uri/ /index.html 中的 $uri/ 会匹配与构建产物目录同名的路由 - Vite 默认将静态资源放在 assets/ 目录下 - 访问 /assets 时,$uri/ 匹配到 assets/ 目录,Nginx 尝试目录访问返回 403 - 类似的路径冲突还有 /dashboard /history 等如果有同名目录也会出问题 修复方案: - 移除 $uri/,改为 try_files $uri /index.html - 真实存在的静态文件(如 /assets/index-abc.js)仍然能通过 $uri 正确返回 - 前端路由路径统一 fallback 到 index.html 由 SPA 路由处理 影响范围:nginx.conf / nginx-production.conf / nginx-staging.conf 三个文件 |
||
|
|
a5f1d9685d |
refactor(phase3): Docker 网络隔离 staging/production 环境
Deploy / Staging E2E Tests (push) Has been skipped
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 141h44m9s
CI/CD Pipeline / Frontend Lint (push) Failing after 141h44m18s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 141h44m18s
- compose.yml: 网络名根据 ENV 变量区分 (xiaoxia-net-staging/xiaoxia-net-production) - infra-production.yml: 使用 xiaoxia-net-production 网络 - infra.yml: 使用 xiaoxia-net-staging 网络 - 新增 nginx-staging.conf (proxy_pass -> xiaoxia-api-staging:8000) - 新增 nginx-production.conf (proxy_pass -> xiaoxia-api-production:8000) - nginx.conf 更新为 production 默认配置 - web-artifact.Dockerfile: 添加 ARG NGINX_CONF 支持构建时选择 nginx 配置 - deploy-staging.sh: 添加 ENV=staging、网络创建、nginx 配置选择 - deploy-production.sh: 添加 ENV=production、网络创建 - deploy.yml: CI 构建传入 NGINX_CONF 参数、远程部署脚本添加网络创建 - deploy.yml: 冒烟测试添加网络隔离验证 |
||
|
|
22c1085c4b |
fix: 永久修复 nginx proxy_pass 配置
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Tests / lint (pull_request) Failing after 143h18m2s
Tests / test (pull_request) Failing after 143h18m2s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 143h18m31s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 143h18m37s
Deploy / Deploy Staging (push) Failing after 143h19m29s
CI/CD Pipeline / Frontend Lint (push) Failing after 143h19m55s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 143h20m2s
- staging nginx.conf: 使用静态 proxy_pass 替代变量型(避免 URI 丢失) - staging 指向容器名 xiaoxia-api-staging(避免 DNS 别名冲突) - 添加 proxy_read_timeout/proxy_send_timeout 300s(与 production 对齐) - web.Dockerfile: 支持 ARG NGINX_CONF 参数化(与 web-artifact.Dockerfile 一致) - production nginx-production.conf 已确认无需修改 |
||
|
|
22ef893b6b |
fix: add Docker DNS resolver to nginx - prevent 502 after API container restart
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Deploy Staging (push) Failing after 143h54m11s
CI/CD Pipeline / Frontend Lint (push) Failing after 143h54m39s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 143h54m46s
- Add resolver 127.0.0.11 valid=10s for Docker internal DNS - Use variable-based proxy_pass to force DNS re-resolution - Prevents nginx from caching stale API container IP |
||
|
|
fc924965f7 |
fix: Nginx 添加 client_max_body_size 和 proxy_request_buffering 配置
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
|
||
|
|
0f42ca1a7b | fix: correct web Dockerfile for Vite (not Next.js) |