diff --git a/ci/README.md b/ci/README.md index ddef802..f02b9d9 100644 --- a/ci/README.md +++ b/ci/README.md @@ -2,4 +2,23 @@ `ci/check-sql.sh` runs storage checks against SQLite and temporary PostgreSQL and MySQL containers. Run it from the workspace root on an approved remote runner. It removes its test containers and network on exit. -![Bedrock deployment and manual SQL verification flow](../deploy/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 +``` diff --git a/deploy/README.md b/deploy/README.md index 5b79e8f..6e6e6e2 100644 --- a/deploy/README.md +++ b/deploy/README.md @@ -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 +```