feat: deploy/deploy.sh 自动化部署体系 — 双tag镜像/快照/迁移门控/回滚,退役根deploy.sh
CI / backend (push) Waiting to run
CI / frontend (push) Waiting to run

- compose 四服务补 image: ${BACKEND_TAG}/${FRONTEND_TAG} 插值(换 tag 回滚前提)
- deploy/deploy.sh:工作区校验→PREV_SHA→pull→predeploy 快照(-Fc)→destructive 判定→
  build+双tag→.pending-deploy→迁移退出码门控→up -d --no-deps→健康轮询→versions.log→
  镜像治理;支持 --dry-run / flock / 基础设施健康门 / 多head预检
- deploy/rollback.sh:双入口(手动读 versions.log 跳 ROLLBACK 行 / --auto 读
  .pending-deploy);destructive 走 pg_restore --clean;双 tag 原子切换
- deploy/hotfix.sh:紧急单文件 cp + 强制收口提醒
- .gitignore 补 .pending-deploy/versions.log(运行时状态)
- 退役根 deploy.sh + deploy.env.example(SSH 旧模型,被 deploy/deploy.sh 取代)
This commit is contained in:
34047007@qq.com
2026-08-10 16:30:43 +08:00
parent 2c6ecc1f91
commit c55d096769
9 changed files with 513 additions and 177 deletions
+4
View File
@@ -46,3 +46,7 @@ backend/data/
# Logs
*.log
# Deploy runtime state (per-server, not for repo)
deploy/.pending-deploy
deploy/versions.log