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>
70 行
2.7 KiB
Markdown
70 行
2.7 KiB
Markdown
# XuqmGroup 私有化部署
|
||
|
||
## 快速开始
|
||
|
||
```bash
|
||
curl -fsSL https://xuqinmin.com/xuqmGroup/XuqmGroup-PrivateDeploy/raw/branch/main/install.sh \
|
||
-o install.sh && bash install.sh
|
||
```
|
||
|
||
脚本自动完成:依赖检测 → 配置生成 → 镜像拉取 → 容器启动 → 租户初始化(新建或迁移)→ 全量验证。
|
||
|
||
部署完成后根据输出的端口表配置宿主机 nginx,详见 [docs/runbook.md](docs/runbook.md)。
|
||
|
||
## 部署架构
|
||
|
||
```
|
||
用户 nginx(宿主机)
|
||
│
|
||
└── 127.0.0.1:11223 内置 nginx 容器(统一入口)
|
||
│
|
||
├── tenant-service /api/ /actuator/
|
||
├── file-service /file/
|
||
├── tenant-web /(兜底)
|
||
├── ops-web /ops
|
||
├── im-service /api/im/ /ws/im
|
||
├── update-service /api/v1/updates/ /api/v1/rn/
|
||
├── license-service /api/license/
|
||
└── push-service (厂商回调,按需)
|
||
```
|
||
|
||
内置 nginx 容器属于 `base` 必启服务,对外只暴露 `127.0.0.1:11223`。宿主机 nginx 只需一条 `proxy_pass` 指向该端口,内部路由由容器负责。各业务容器(11224–11231)仍绑定宿主机以便直接调试,正常流量全部走 11223。
|
||
|
||
## 租户初始化方式
|
||
|
||
安装脚本启动后交互式选择:
|
||
|
||
- **新建租户**:填写邮箱、用户名、密码,首次启动自动创建
|
||
- **迁移租户**:在公有化平台安全中心生成迁移密钥(`pmk_` 开头),粘贴后自动完成导入
|
||
|
||
## 服务说明
|
||
|
||
| Profile | 服务 | 说明 |
|
||
|---------|------|------|
|
||
| base | tenant-service, file-service, tenant-web, ops-web, nginx | 必选核心服务(含内置路由 nginx) |
|
||
| infra-mysql | mysql | 托管数据库 |
|
||
| infra-redis | redis | 托管缓存 |
|
||
| im | im-service | IM HTTP + WebSocket |
|
||
| push | push-service | 厂商推送 |
|
||
| update | update-service | 版本管理 + RN 热更新 |
|
||
| license | license-service | License 校验 |
|
||
|
||
## 后期启用/禁用服务
|
||
|
||
```bash
|
||
./scripts/enable-service.sh im
|
||
./scripts/disable-service.sh im
|
||
```
|
||
|
||
## 注意事项
|
||
|
||
- `application.yml` 中数据库 URL 硬编码了生产地址,`docker-compose.yml` 的 `environment:` 节负责覆盖,**不能删除**
|
||
- 宿主机 nginx `proxy_pass` 写 `http://127.0.0.1:11223`,同时须透传 `Upgrade` / `Connection` 头(WebSocket 必需),详见 [docs/runbook.md](docs/runbook.md)
|
||
- 不能写 `localhost`,部分系统 localhost 解析为 IPv6
|
||
|
||
## 文档
|
||
|
||
- [运行手册](docs/runbook.md) — 完整部署流程、nginx 配置、常用运维命令
|
||
- [配置说明](docs/configuration.md) — 各配置文件字段说明
|
||
- [验收清单](docs/acceptance-checklist.md) — 交付验收检查项
|