修改配置
This commit is contained in:
15
README.md
15
README.md
@@ -283,6 +283,21 @@ TENCENT_SDK_SECRET_KEY=xxx
|
||||
> - `ws` → meetingmsg 弹幕 WebSocket `:8000`
|
||||
> - `liveApi` → livestream 直播间 API `:8081`
|
||||
|
||||
### Nginx 反代(仅公网 IP,供 PC / 浏览器访问后端)
|
||||
|
||||
无域名时,在**测试服务器**上部署 Nginx,统一监听 **HTTP :80**,把路径转发到本机 `openim-server` / `chat-api`:
|
||||
|
||||
| 路径前缀 | 后端 |
|
||||
|----------|------|
|
||||
| `/api/im/` | `127.0.0.1:10002` |
|
||||
| `/api/user/`、`/api/chat/` | `127.0.0.1:10008` |
|
||||
| `/msg_gateway` | `127.0.0.1:10001`(WebSocket) |
|
||||
|
||||
1. 服务器上已执行 `05-start.sh` 等,保证 `10001/10002/10008` 在监听。
|
||||
2. 仓库根目录执行:`sudo ./deploy-test/00-init-tools.sh nginx`(会安装 `nginx` 并写入配置 `deploy-test/nginx/openim-pc-proxy.conf`;亦已包含在 `00-init-tools.sh` 无参的 **all** 流程末尾,需 root)。
|
||||
3. 云安全组放行 **TCP 80**。
|
||||
4. `.env.deploy-test` 中设置 **`PC_BACKEND_ORIGIN=http://<DEPLOY_TEST_IP>`**(无末尾 `/`),与 `DEPLOY_TEST_IP` 一致;再 `./deploy-test/07-start-frontend.sh pc` 启动 PC 时即注入 `VITE_*`。
|
||||
|
||||
### Docker 基础设施
|
||||
|
||||
| 服务 | 端口 |
|
||||
|
||||
Reference in New Issue
Block a user