Document deployment and SQL checks with Mermaid

This commit is contained in:
2026-11-30 17:34:40 +08:00
parent 73192bf944
commit 3d0ce4ad7d
2 changed files with 40 additions and 2 deletions
+20 -1
View File
@@ -17,4 +17,23 @@ Pull requests currently run without an automatic storage check. The optional `ci
Gitea builds a release on `ces-control` when a commit lands on `main`. The deploy step renders the private PostgreSQL configuration and runs the current one-shot Rust storage initializer on the existing `endoleap-dev_default` network. It publishes releases under `/opt/endoleap-infra/bedrock-rust/releases` and switches `/opt/endoleap-infra/bedrock-rust/current` after successful initialization. The Go service retains its own containers and routes.
![Bedrock deployment and manual SQL verification flow](./bedrock-deployment.svg)
```mermaid
flowchart TD
subgraph cd["main 更新后自动部署"]
M["main 收到提交"] --> W["deploy.yml 在 ces-control 上启动"]
W --> B["build-release.sh 编译发布版"]
B -->|Bedrock 二进制和 Git SHA| R["release.sh 暂存待发布版本"]
R --> P["render-postgres.py 生成私有 bedrock.yaml"]
E["Gitea PostgreSQL Variables 和 Secret"] -->|部署参数| P
P -->|配置就绪| I["临时容器运行 Bedrock,由 Bedrock 初始化 PostgreSQL"]
I -->|成功| S["保存版本并原子切换 current"]
P -->|失败| F["清理暂存目录,保留现有 current"]
I -->|失败| F
end
subgraph manual["手动 SQL 检查"]
H["在远程 runner 手动运行"] --> C["ci/check-sql.sh 创建临时网络和数据库容器"]
C --> T["测试 SQLite、PostgreSQL 和 MySQL"]
T -->|退出时| U["清理测试容器和临时网络"]
end
```