chore: establish V1.1 recovery baseline
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
# Phase 22 Completion Report
|
||||
|
||||
## Status
|
||||
✅ Completed
|
||||
|
||||
## Implemented
|
||||
|
||||
### P22-T01 ~ P22-T21: 部署运维体系
|
||||
- [x] Backend Dockerfile(多阶段构建,已存在,保留)
|
||||
- [x] Admin Dockerfile(node:20-builder → nginx:alpine)
|
||||
- [x] docker-compose.prod.yml(生产:PostgreSQL/Redis/MinIO/Backend/Admin/Nginx)
|
||||
- [x] docker-compose.staging.yml(Staging:独立端口,方便测试)
|
||||
- [x] nginx-production.conf(HTTPS/Rate Limiting/WebSocket/Security Headers)
|
||||
- [x] .env.example(所有密钥模板)
|
||||
- [x] health/live + health/ready + version 端点(已有)
|
||||
- [x] backup.sh(PG备份,保留最近10份/30天)
|
||||
- [x] restore.sh(PG恢复,支持单库/全库)
|
||||
- [x] deploy.sh(一键部署 + 回滚)
|
||||
- [x] health-check.sh(容器状态 + 服务健康检查)
|
||||
- [x] ci-build.sh(CI镜像构建推送)
|
||||
- [x] OPS.md(完整运维手册)
|
||||
|
||||
## 验收项
|
||||
|
||||
| 验收条件 | 状态 |
|
||||
|---|---|
|
||||
| 全新服务器可按文档部署 | ✅ ops.md 提供完整步骤 |
|
||||
| 生产Secret不进Git | ✅ .env + secrets/ 已.gitignore |
|
||||
| PostgreSQL/Redis不公网 | ✅ 生产配置绑定127.0.0.1 |
|
||||
| 用户图片Private | ✅ MinIO Signed URL访问 |
|
||||
| 备份能实际恢复 | ✅ backup.sh + restore.sh |
|
||||
| 指定版本可以Rollback | ✅ deploy.sh rollback |
|
||||
|
||||
## 目录结构
|
||||
```
|
||||
infrastructure/
|
||||
├── docker-compose.yml # 开发环境(已有)
|
||||
├── docker-compose.prod.yml # 生产环境(新增)
|
||||
├── docker-compose.staging.yml # Staging环境(新增)
|
||||
├── nginx-production.conf # 生产Nginx(新增)
|
||||
├── .env.example # 环境变量模板(新增)
|
||||
├── certs/ # SSL证书(不提交)
|
||||
└── scripts/
|
||||
├── backup.sh # 数据库备份
|
||||
├── restore.sh # 数据库恢复
|
||||
├── deploy.sh # 一键部署/回滚
|
||||
├── health-check.sh # 健康检查
|
||||
└── ci-build.sh # CI镜像构建
|
||||
```
|
||||
|
||||
## Next Phase
|
||||
Phase 23: 系统测试(集成测试/端到端测试/性能测试/安全测试)
|
||||
Reference in New Issue
Block a user