🐛 fix(deploy): 修 unified backend 与 frontend 抢占宿主 10003 冲突
上一版把 frontend 与 backend 都映射 10003:8000,会触发 docker 启动时 "bind: address already in use"。修正: - docker-compose.yml backend ports 改为 expose: ["8000"]——不映射宿主机, 仅在 docker 网络 gemold_network 内被 frontend 经 backend:8000 反代访问 - .env.example 删除 BACKEND_PORT 字段(不再需要) - PORT_CONFIG / DEPLOY_PORT 端口映射表/示例同步:unified backend 不暴露 宿主机端口,统一经前端 /api 反代 验证:yaml 渲染后无任何 service 对抢宿主端口(unified 仅 frontend 暴露 $FRONTEND_PORT=10003;moldinsight-only 仅 moldinsight 暴露 10003; inventory-only 仅 inventory 暴露 10004)。 Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -71,7 +71,9 @@
|
||||
关键端口映射(默认 10003 / 10004,详见 [.env.example](../../.env.example)):
|
||||
|
||||
- `FRONTEND_PORT` → frontend Nginx 外部端口(浏览器入口,推荐直接访问)
|
||||
- `BACKEND_PORT` → unified backend 外部端口(一般不直接访问,经前端 /api 反代同域访问)
|
||||
- unified backend → **不暴露宿主机端口**,经前端 /api 反代同域访问(docker 网络内 `backend:8000` 互通)
|
||||
- `MOLDINSIGHT_PORT` → moldinsight-only 模式宿主机端口
|
||||
- `INVENTORY_PORT` → inventory-only 模式宿主机端口
|
||||
- `MOLDINSIGHT_PORT` → moldinsight-only 独立部署端口
|
||||
- `INVENTORY_PORT` → inventory-only 独立部署端口
|
||||
|
||||
|
||||
Reference in New Issue
Block a user