feat(video): Release 环境部署独立 ZLM + video-server
- 添加 zlmediakit-release 容器(host 网络) - 添加 video-server 连接本地 ZLM - ZLM HTTP 7080 / RTSP 7554 / RTMP 7935 / RTP 30000-30500 - Hook URL 指向 127.0.0.1:48093 (video-server) - SIP ID 末位 02 与 Prod 区分 - Secret 统一使用 u3UapOhmZa9er7S37Hc2k695NlZOBYdB Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,7 @@ networks:
|
||||
|
||||
volumes:
|
||||
app-logs:
|
||||
zlm-data: # ZLM 录像存储
|
||||
|
||||
# ============================================
|
||||
# 公共环境变量片段(YAML anchor)
|
||||
@@ -236,3 +237,70 @@ services:
|
||||
depends_on:
|
||||
viewsh-module-iot-server:
|
||||
condition: service_healthy
|
||||
|
||||
# ===== ZLMediaKit 媒体服务器(Release 环境独立部署) =====
|
||||
zlmediakit:
|
||||
image: zlmediakit/zlmediakit:master
|
||||
container_name: zlmediakit-release
|
||||
restart: on-failure:5
|
||||
network_mode: host # 使用宿主机网络,简化 RTP 端口映射
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
volumes:
|
||||
- ./docker-compose/zlm-config-release.ini:/opt/media/conf/config.ini:ro
|
||||
- zlm-data:/opt/media/bin/www # 录像持久化
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 512m
|
||||
cpus: '0.5'
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:7080/index/api/api_summary"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
|
||||
# ===== Video 视频模块(连接本地 ZLM) =====
|
||||
viewsh-module-video-server:
|
||||
image: ${REGISTRY_HOST:-172.17.16.7:5000}/viewsh-module-video-server:${IMAGE_TAG:-latest}
|
||||
container_name: aiot-video-server-release
|
||||
restart: on-failure:5
|
||||
ports:
|
||||
- "48093:48093" # 应用端口
|
||||
- "5060:5060" # SIP UDP/TCP(设备注册)
|
||||
- "5060:5060/udp"
|
||||
- "9905:9905" # XXL-Job executor
|
||||
environment:
|
||||
<<: *common-env
|
||||
JAVA_OPTS: "-Xms512m -Xmx1024m -XX:+UseContainerSupport -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/app/logs"
|
||||
XXL_JOB_EXECUTOR_PORT: 9905
|
||||
|
||||
# ===== SIP 配置(Release 环境独立 SIP ID) =====
|
||||
SIP_ID: "44010200492000000002"
|
||||
SIP_DOMAIN: "4401020049"
|
||||
|
||||
# ===== ZLMediaKit 连接配置(连接本地 host 网络 ZLM) =====
|
||||
ZLM_SERVER_ID: "zlmediakit-release"
|
||||
ZLM_IP: "127.0.0.1" # host 网络,直接用宿主机地址
|
||||
ZLM_HTTP_PORT: "7080" # ZLM HTTP 端口(避免与宿主机 80 冲突)
|
||||
ZLM_SECRET: "u3UapOhmZa9er7S37Hc2k695NlZOBYdB"
|
||||
ZLM_AUTO_CONFIG: "true"
|
||||
volumes:
|
||||
- app-logs:/app/logs
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 1536m
|
||||
cpus: '1.0'
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:48093/actuator/health"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 12
|
||||
start_period: 120s
|
||||
depends_on:
|
||||
viewsh-module-ops-server:
|
||||
condition: service_healthy
|
||||
zlmediakit:
|
||||
condition: service_healthy
|
||||
|
||||
Reference in New Issue
Block a user