fix: host_deploy stops/starts and health-checks server-2 too (#56)
Co-authored-by: host <host@test.local>
This commit is contained in:
1 parent
84ff968111
commit
c6e633d162
3 files changed
+75
-13
No files matched your search
+2
-1
@@ -85,7 +85,8 @@ deploy/deploy.sh <host> [user] [--dry-run]
|
||||
- 备份保留策略:每次部署前在主机上把当前 `/opt/codex-app-server` 打包到
|
||||
`/opt/codex-app-server-backups/codex-app-server-<时间戳>.tar.gz`(排除
|
||||
work/ 目录以免过大),只留最近 3 份,多余的自动删掉。
|
||||
- 健康门:重启后循环 curl `localhost:8765/health` 最多 60 秒,要求
|
||||
- 健康门:重启后循环 curl `localhost:8765/health` 与
|
||||
`localhost:8766/health`(server-2 存在时)最多 60 秒,要求
|
||||
`ok=true` 且 `backend=postgres` 且 `db_ok=true`;失败时自动恢复刚打的
|
||||
备份包并重启,再验一次。回滚后 health 恢复也算部署失败(退出非零),
|
||||
因为新代码没上去;回滚后 health 仍失败则退出非零并明说
|
||||
|
||||
Reference in new issue
Block a user