Continue to fix format issues

This commit is contained in:
Baohua Yang
2026-02-21 10:47:37 -08:00
parent 47cfc173a6
commit 5ae315c9dd
48 changed files with 667 additions and 727 deletions

View File

@@ -8,23 +8,27 @@
如图 10-2 所示Rails PostgreSQL 在同一 Compose 网络中协同工作
```
┌─────────────────────────────────────────────────────────────┐
Docker Compose 网络 │
┌─────────────────────┐ ┌─────────────────────┐ │
web 服务 │ │ db 服务 │ │
┌───────────────┐ │ ┌───────────────┐ │ │
Rails │ │──────│ │ PostgreSQL │ │ │
应用 │ │ :5432│ │ 数据库 │ │ │
└───────────────┘ │ │ └───────────────┘ │ │
│ │ :3000 │ │ │ │
└──────────┬──────────┘ └─────────────────────┘ │
│ │
└─────────────┼───────────────────────────────────────────────┘
localhost:3000
```mermaid
flowchart TD
subgraph Network ["Docker Compose 网络"]
direction LR
subgraph Web ["web 服务"]
direction TB
Rails["Rails<br/>应用"]
Port3000[":3000"]
Rails ~~~ Port3000
end
subgraph DB ["db 服务"]
direction TB
Postgres["PostgreSQL<br/>数据库"]
end
Rails -- ":5432" --> Postgres
end
Browser["localhost:3000"]
Port3000 --> Browser
```
10-2 Rails + PostgreSQL Compose 架构