docs: 更新架构图和 nginx 配置说明至单入口设计

README 架构图改为内置 nginx 容器作为统一入口(端口 11223),
服务表移除 nginx-bundled(可选)改为 nginx 列入 base,
注意事项更新为 proxy_pass 127.0.0.1:11223。
configuration.md 将"内置 nginx(可选)"更正为必启服务。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
这个提交包含在:
徐勤民 2026-05-20 16:35:27 +08:00
父节点 a55121aa05
当前提交 2f81f21e42
共有 2 个文件被更改,包括 17 次插入22 次删除

查看文件

@ -16,17 +16,19 @@ curl -fsSL https://xuqinmin.com/xuqmGroup/XuqmGroup-PrivateDeploy/raw/branch/mai
``` ```
用户 nginx宿主机 用户 nginx宿主机
├── 127.0.0.1:11224 tenant-service /api/ /actuator/ └── 127.0.0.1:11223 内置 nginx 容器(统一入口)
├── 127.0.0.1:11225 file-service /file/
├── 127.0.0.1:11226 tenant-web / ├── tenant-service /api/ /actuator/
├── 127.0.0.1:11227 ops-web /ops ├── file-service /file/
├── 127.0.0.1:11228 im-service /api/im/ /ws/im ├── tenant-web /(兜底)
├── 127.0.0.1:11229 update-service /api/v1/updates/ /api/v1/rn/ ├── ops-web /ops
├── 127.0.0.1:11230 license-service /api/license/ ├── im-service /api/im/ /ws/im
└── 127.0.0.1:11231 push-service (厂商回调,按需) ├── update-service /api/v1/updates/ /api/v1/rn/
├── license-service /api/license/
└── push-service (厂商回调,按需)
``` ```
各服务仅绑定 `127.0.0.1`,外部无法直接访问,只有宿主机 nginx 能代理进去 内置 nginx 容器属于 `base` 必启服务,对外只暴露 `127.0.0.1:11223`。宿主机 nginx 只需一条 `proxy_pass` 指向该端口,内部路由由容器负责。各业务容器11224–11231仍绑定宿主机以便直接调试,正常流量全部走 11223
## 租户初始化方式 ## 租户初始化方式
@ -39,14 +41,13 @@ curl -fsSL https://xuqinmin.com/xuqmGroup/XuqmGroup-PrivateDeploy/raw/branch/mai
| Profile | 服务 | 说明 | | Profile | 服务 | 说明 |
|---------|------|------| |---------|------|------|
| base | tenant-service, file-service, tenant-web, ops-web | 必选核心服务 | | base | tenant-service, file-service, tenant-web, ops-web, nginx | 必选核心服务(含内置路由 nginx |
| infra-mysql | mysql | 托管数据库 | | infra-mysql | mysql | 托管数据库 |
| infra-redis | redis | 托管缓存 | | infra-redis | redis | 托管缓存 |
| im | im-service | IM HTTP + WebSocket | | im | im-service | IM HTTP + WebSocket |
| push | push-service | 厂商推送 | | push | push-service | 厂商推送 |
| update | update-service | 版本管理 + RN 热更新 | | update | update-service | 版本管理 + RN 热更新 |
| license | license-service | License 校验 | | license | license-service | License 校验 |
| nginx-bundled | nginx | 内置 nginx默认不启动,用户有宿主机 nginx 时不需要) |
## 后期启用/禁用服务 ## 后期启用/禁用服务
@ -58,7 +59,8 @@ curl -fsSL https://xuqinmin.com/xuqmGroup/XuqmGroup-PrivateDeploy/raw/branch/mai
## 注意事项 ## 注意事项
- `application.yml` 中数据库 URL 硬编码了生产地址,`docker-compose.yml` 的 `environment:` 节负责覆盖,**不能删除** - `application.yml` 中数据库 URL 硬编码了生产地址,`docker-compose.yml` 的 `environment:` 节负责覆盖,**不能删除**
- 所有容器绑定 `127.0.0.1`,nginx 中 `proxy_pass` 必须写 `127.0.0.1:1122x`,不能写 `localhost`(部分系统 localhost 解析为 IPv6 - 宿主机 nginx `proxy_pass``http://127.0.0.1:11223`,同时须透传 `Upgrade` / `Connection`WebSocket 必需),详见 [docs/runbook.md](docs/runbook.md)
- 不能写 `localhost`,部分系统 localhost 解析为 IPv6
## 文档 ## 文档

查看文件

@ -80,7 +80,7 @@ environment:
| 11230 | license-service | 8085 | `/api/license/` | | 11230 | license-service | 8085 | `/api/license/` |
| 11231 | push-service | 8083 | 厂商回调(按需) | | 11231 | push-service | 8083 | 厂商回调(按需) |
所有端口绑定 `127.0.0.1`nginx 需写 `proxy_pass http://127.0.0.1:1122x` 所有端口绑定 `127.0.0.1`11224–11231 仅用于直接调试。宿主机 nginx 代理到内置 nginx 端口 11223,详见 [runbook.md](runbook.md)
## 容器内部通信 ## 容器内部通信
@ -97,16 +97,9 @@ SDK_TENANT_SERVICE_URL: "http://tenant-service:9001"
`docker-compose.yml` 已包含上述配置,不需要手动修改。 `docker-compose.yml` 已包含上述配置,不需要手动修改。
## 内置 nginx(可选) ## 内置 nginx
`nginx-bundled` profile 提供内置 nginx 容器,默认不启动。通常用宿主机自己的 nginx 代理到各服务端口。需要内置 nginx 时: nginx 容器属于 `base` 必启服务,绑定 `127.0.0.1:11223`,统一处理所有内部路由(按 Docker 服务名转发,无需关心各服务端口)。宿主机 nginx 只需一条 `proxy_pass http://127.0.0.1:11223` 加 WebSocket 透传头,配置见 [runbook.md](runbook.md#nginx-配置)。
```env
# .env
COMPOSE_PROFILES=base,infra-mysql,infra-redis,im,push,update,license,nginx-bundled
```
内置 nginx 绑定宿主机 80/443 端口,与宿主机已有 nginx 冲突时不可同时使用。
## `config/vendors/` ## `config/vendors/`