arch-design-agent-skill-das.../design/technology-architecture/04-release-and-rollback.md

57 lines
937 B
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.

---
doc_id: DOC-TA-004
title: 发布与回滚
version: 0.1.0
status: reviewed
owners:
- 林然
upstream:
- ./03-operational-baseline.md
downstream: []
updated_at: 2026-03-23
---
# 发布与回滚
## 发布流程
```bash
# 1. 拉取最新代码
git pull
# 2. 构建并部署
docker compose build
docker compose up -d
# 3. 验证
curl http://localhost/api/health # 期望 {"status": "ok"}
# 浏览器打开首页确认可访问
```
## 回滚流程
```bash
# 1. 停止当前版本
docker compose down
# 2. 回退到上一个版本
git checkout <上个版本的 commit/tag>
# 3. 重新构建部署
docker compose build
docker compose up -d
# 4. 验证
curl http://localhost/api/health
```
## 验证标准
- `/api/health` 返回 HTTP 200 + `{"status": "ok"}`
- 前端首页可访问
- 已注册项目列表正常加载
## 零停机
不需要。单人使用,发布期间短暂不可用(通常 < 30 可以接受