# 博客重基建 Phase 0:备份/gitea/Artalk/发布链地基 - 任务拆解 ## 使用规则 - 每个任务都要写清楚 `boundary` 和 `verify`;机器任务的 verify 以首个反引号 span 为执行的命令 - 如果一个任务没有验证方式,就不能开始;确无命令可执行的任务写 `verify: manual: <理由>` - 发现的可执行问题必须回写本包,并在本轮做完 - verify 命令不得自引用本包 check 门禁 - 多 agent 协作:任务可加 `claim:` 行声明在做者(信息约定,非锁);worker 交付物经 orchestrator 验收后由 orchestrator 勾选 ## 阶段一:实现 - [x] 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` - [x] 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/v2/conf && docker inspect -f {{.State.Status}} artalk | grep -q running` - [x] T5 域名接入(依赖用户 ESA 操作 + T3/T4 草稿) - depends-on: task_0003, task_0004 - 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: task_0003 - 注记:骨架仅依赖 gitea 形态,与 T5 域名解耦,提前完成(2026-10-24 修正) - claim: orchestrator 2026-10-24 - boundary: 仓库内新增 `infra/deploy/`(webhook 接收脚本骨架 + 回滚预案文档);宿主机建 `/var/www/blog-staging/` 占位目录;不切换任何 nginx upstream - verify: `bash infra/deploy/rollback-dryrun.sh` - [x] T7 Phase 0 验收(全量复跑 + 生产无恙复查) - depends-on: task_0001, task_0002, task_0003, task_0004, task_0005, task_0006 - 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.Health.Status}} halo-halo-1 | grep -q healthy` --- **当前进度**:由脚本计算,无需手动维护