docs: 添加 README、Release 模板、docker-compose 编排、构建发布脚本

This commit is contained in:
2026-05-17 20:05:45 +08:00
parent 389df53d2d
commit 17b40cea7b
5 changed files with 717 additions and 52 deletions

83
RELEASE_TEMPLATE.md Normal file
View File

@@ -0,0 +1,83 @@
# 🏷️ vX.Y.Z — YYYY-MM-DD
> **镜像**: `gitea.timxx.cn/admin/cloudsearch:vX.Y.Z`
> **Commit**: `abc1234`
> **构建**: `./build.sh` → Docker 多阶段构建 (node:20-alpine)
---
## ✨ 新增功能
-
---
## 🐛 问题修复
-
---
## 💥 破坏性变更
>
---
## ⚠️ 升级注意事项
### 环境变量变更
> 本次无需修改 `.env`
```diff
# 如需新增/修改环境变量:
# + NEW_VAR=value
# - OLD_VAR=value → NEW_VAR=value
```
### 数据库迁移
> 本次无需手动迁移
```sql
-- 如需执行 SQL请先在 staging 验证):
-- ALTER TABLE xxx ADD COLUMN yyy TEXT DEFAULT '';
```
### 升级步骤
```bash
# 1. 拉取新镜像
docker pull gitea.timxx.cn/admin/cloudsearch:vX.Y.Z
# 2. 更新 docker-compose.yml 中的镜像标签(或使用 latest
# image: gitea.timxx.cn/admin/cloudsearch:vX.Y.Z
# 3. 重新部署
docker compose up -d app
# 4. 验证
curl -s http://localhost:9527/health | jq .version
# → "X.Y.Z"
```
---
## 📋 完整 Changelog
<!-- 用 git log 生成:
git log v0.3.31..v0.3.32 --oneline --no-merges
-->
```
abc1234 feat: xxx
def5678 fix: yyy
```
---
## 🔗 相关
- Gitea: https://gitea.timxx.cn/admin/CloudSearch
- 版本规则: Patch 每次任务 +0.0.1 · Minor 每轮稳定 +0.1.0 · Major 需确认