Files
blog/.spec/specs/2026-10-24_add-blog-infra/tasks.md
T
wait4xandGLM-5.3 f16b9487d3 feat(deploy): 发布链地基三件套——webhook 骨架/构建占位/回滚干跑
- webhook-receive.sh:HMAC 骨架 + 仅 main 分支触发(干跑验证两条 ref 路径)
- build.sh:锁发布链形态与路径约定,astro 命令留 Phase 1 TODO
- rollback-dryrun.sh:回滚四前置条件验证 + 人为操作手册(秒级回 18090)
- staging 落用户区 ~/docker_apps/blog/www-staging(宿主 sudo 不可用,nginx 以 root 读用户目录无碍)

验证: webhook 干跑 main accepted / non-main ignored;rollback-dryrun
      四要素 ok(halo vhost/容器/响应/staging)

Co-authored-by: GLM-5.3
2026-10-24 22:10:59 +08:00

53 lines
3.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 博客重基建 Phase 0:备份/gitea/Artalk/发布链地基 - 任务拆解
## 使用规则
- 每个任务都要写清楚 `boundary` 和 `verify`;机器任务的 verify 以首个反引号 span 为执行的命令
- 如果一个任务没有验证方式,就不能开始;确无命令可执行的任务写 `verify: manual: <理由>`
- 发现的可执行问题必须回写本包,并在本轮做完
- verify 命令不得自引用本包 check 门禁
- 多 agent 协作:任务可加 `claim:` 行声明在做者(信息约定,非锁);worker 交付物经 orchestrator 验收后由 orchestrator 勾选
## 阶段一:实现
- [ ] T1 生产备份(halo_db + halo2 目录)
- claim: orchestrator 2026-10-24
- boundary: 只读 postgres(pg_dump)与只读打包 `~/docker_apps/halo/halo2`;产物只写 `~/backups/blog/halo-20261024/`;不碰任何容器运行状态
- verify: `bash .spec/specs/2026-10-24_add-blog-infra/evidence/verify_backup.sh`
- [ ] T2 翻译引擎确认(new-api 网关)
- claim: orchestrator 2026-10-24
- boundary: 只读调用 127.0.0.1:3000 的模型列表与一次 chat 调用;证据写 `evidence/new-api-check.json`;不改 new-api 配置
- verify: `test -s .spec/specs/2026-10-24_add-blog-infra/evidence/new-api-check.json`
- [x] T3 gitea 部署(容器 13020,nginx conf 草稿不安装)
- claim: op-gitea 2026-10-24
- boundary: 新建 `~/docker_apps/gitea/`(compose+数据卷);容器仅绑 127.0.0.1:13020;初始化管理员与 blog 空仓;nginx conf 草稿与 app.ini 上传限制调整(MAX_FILES=20)写进 `infra/gitea/`(仓库内);不安装任何 nginx 配置、不 reload、不碰 DNS
- verify: `curl -sf http://127.0.0.1:13020/api/v1/version && docker inspect -f {{.State.Status}} gitea | grep -q running`
- [x] T4 Artalk 部署(容器 13030,nginx conf 草稿不安装)
- claim: op-artalk 2026-10-24
- boundary: 新建 `~/docker_apps/artalk/`(compose+sqlite 卷);容器仅绑 127.0.0.1:13030;站点配置含 wait4x.online;nginx conf 草稿(主域 /artalk location)写进 `infra/artalk/`(仓库内);不安装任何 nginx 配置、不 reload、不碰 DNS
- verify: `curl -sf http://127.0.0.1:13030/api && docker inspect -f {{.State.Status}} artalk | grep -q running`
- [ ] T5 域名接入(依赖用户 ESA 操作 + T3/T4 草稿)
- depends-on: T3, T4
- claim: orchestrator 2026-10-24
- boundary: 用户在 ESA 控制台添加 git.wait4x.online(代理开)后:安装两份 conf 到 sites-available + symlink + nginx -t + reload;仅新增文件,不改既有 vhost
- verify: `curl -skf https://git.wait4x.online -o /dev/null -w '%{http_code}' | grep -q 200`
- [x] T6 发布链地基(webhook 脚本骨架 + 回滚预案)
- depends-on: T3(2026-10-24 修正:骨架仅依赖 gitea 形态,与 T5 域名解耦,提前完成)
- claim: orchestrator 2026-10-24
- boundary: 仓库内新增 `infra/deploy/`(webhook 接收脚本骨架 + 回滚预案文档);宿主机建 `/var/www/blog-staging/` 占位目录;不切换任何 nginx upstream
- verify: `bash infra/deploy/rollback-dryrun.sh`
- [ ] T7 Phase 0 验收(全量复跑 + 生产无恙复查)
- depends-on: T1, T2, T3, T4, T5, T6
- claim: orchestrator 2026-10-24
- boundary: 复跑 T1-T6 全部 verify;复查生产状态;结论写 evidence;向 blog 房 board 汇报
- verify: `curl -sf http://127.0.0.1:18090 -o /dev/null -w '%{http_code}' | grep -q 200 && docker inspect -f {{.State.Status}} halo-halo-1 | grep -q healthy`
---
**当前进度**:由脚本计算,无需手动维护