fix(deploy): 公网 overlay 用 !override 覆盖内部端口绑定

Compose 合并后内部端口只绑 127.0.0.1,避免与基础 0.0.0.0 叠加导致起不来。
顺带给 JPUSH_PUSH_INTENT 加引号,并拒绝空 SERVER_IP。

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
编码工程师
2026-08-30 21:55:33 +08:00
co-authored by Cursor multica-agent
parent f1fe4a3928
commit a71f6a0ce1
6 changed files with 26 additions and 9 deletions
+9 -6
View File
@@ -1,13 +1,16 @@
# 公网测试 overlay。用法(在仓库根目录,由总工执行,本卡不跑):
# set -a && . ./.env && ./scripts/load-jpush-secret.sh && set +a
# ./scripts/load-jpush-secret.sh
# docker compose -f docker-compose.yaml -f deploy/public/docker-compose.public.yaml up -d
# 不要用 shell source/. 加载 .envJPUSH_PUSH_INTENT 含分号,未加引号时会被拆成命令。
# compose 会自行读取仓库根目录 .env 做变量替换;Master Secret 只经 load-jpush-secret.sh 注入。
#
# 原则:内部端口只绑 127.0.0.1;对外只开 80/443 + LiveKit 媒体 17881/tcp、17882/udp。
# ports 使用 !override,避免与基础 compose 的 0.0.0.0 绑定叠加。
# 回滚:去掉本 overlay,改回 docker compose -f docker-compose.yaml up -d,数据目录 components/ 与 data/ 不动。
services:
openim-server:
ports:
ports: !override
- "127.0.0.1:${OPENIM_MSG_GATEWAY_PORT}:10001"
- "127.0.0.1:${OPENIM_API_PORT}:10002"
environment:
@@ -18,18 +21,18 @@ services:
- IMENV_OPENIM_PUSH_JPUSH_PUSHINTENT=${JPUSH_PUSH_INTENT}
minio:
ports:
ports: !override
- "127.0.0.1:${MINIO_PORT}:9000"
- "127.0.0.1:${MINIO_CONSOLE_PORT}:9090"
etcd:
ports:
ports: !override
- "127.0.0.1:12379:2379"
- "127.0.0.1:12380:2380"
livekit:
command: --config /etc/livekit.yaml --node-ip ${SERVER_IP}
ports:
ports: !override
- "127.0.0.1:${LIVEKIT_PORT:-17880}:17880"
- "${LIVEKIT_RTC_TCP_PORT:-17881}:17881"
- "${LIVEKIT_RTC_UDP_PORT:-17882}:17882/udp"
@@ -37,7 +40,7 @@ services:
- ./config/livekit.public.yaml:/etc/livekit.yaml
account-server:
ports:
ports: !override
- "127.0.0.1:${ACCOUNT_PORT:-10010}:10010"
edge: