HH-807: harden runtime coordination (#21)

This commit is contained in:
2026-08-31 19:37:17 +08:00
parent 1d9fd9f0e0
commit 024bf14448
7 changed files with 937 additions and 45 deletions
+7 -7
View File
@@ -73,13 +73,13 @@ curl --fail --silent --show-error \
docker compose exec -T postgres \
psql -U creatorhub -d creatorhub -tAc \
'SELECT 1 FROM schema_migration WHERE version = 2;' \
| grep -qx 2
'SELECT 1 FROM schema_migration WHERE version = 12;' \
| grep -qx 1
docker compose ps
```
健康检查应成功,浏览器列表接口应返回 JSON,迁移查询当前应输出 `2`,三个 Compose 服务应为运行状态。然后访问 <http://127.0.0.1:8080>;修改过 `CREATORHUB_PORT` 时使用对应端口。
健康检查应成功,浏览器列表接口应返回 JSON,迁移查询当前应输出 `1`,三个 Compose 服务应为运行状态。然后访问 <http://127.0.0.1:8080>;修改过 `CREATORHUB_PORT` 时使用对应端口。
排障时读取结构化服务日志:
@@ -183,8 +183,8 @@ docker compose up --detach --build
< "$BACKUP_FILE"
docker compose exec -T postgres \
psql -U creatorhub -d creatorhub_restore_check -v ON_ERROR_STOP=1 -tAc \
'SELECT 1 FROM schema_migration WHERE version = 2;' \
| grep -qx 2
'SELECT 1 FROM schema_migration WHERE version = 12;' \
| grep -qx 1
docker compose exec -T postgres \
dropdb --force -U creatorhub creatorhub_restore_check
@@ -230,8 +230,8 @@ docker compose up --detach --build
< "$BACKUP_FILE"
docker compose exec -T postgres \
psql -U creatorhub -d creatorhub -v ON_ERROR_STOP=1 -tAc \
'SELECT 1 FROM schema_migration WHERE version = 2;' \
| grep -qx 2
'SELECT 1 FROM schema_migration WHERE version = 12;' \
| grep -qx 1
git switch --detach "$RESTORE_REV"
if ! docker compose up --detach --build; then