适配Docker部署环境,修复拉流代理播放失败问题

1. Docker环境适配:
   - Dockerfile基础镜像从JDK11升级为eclipse-temurin:21
   - pom.xml编译版本从Java21降为Java17
   - docker-compose开放Redis(6379)、MySQL(3306)、ZLM(6080)端口映射
   - application.yml激活profile改为dev
   - application-dev.yml适配Docker服务连接参数(Redis/MySQL/ZLM)

2. 修复拉流代理播放失败:
   - Nginx添加流媒体后缀代理规则(.flv/.m3u8/.ts等),支持自定义app名的流路径
   - Nginx添加WebRTC API代理规则
   - Nginx添加sub_filter规则,将API返回的流地址端口从80(ZLM容器内部端口)重写为8080(Nginx对外端口)
   - docker-compose向Nginx容器传递WebHttp环境变量

3. ZLMediaKit配置补充onvif和rtc相关配置段

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-03 11:10:06 +08:00
parent 40555d917b
commit 0afb3c42a4
7 changed files with 79 additions and 24 deletions

View File

@@ -20,18 +20,18 @@ spring:
# [必须修改] 端口号
port: 6379
# [可选] 数据库 DB
database: 7
database: 0
# [可选] 访问密码,若你的redis服务器没有设置密码就不需要用密码去连接
password: luna
# password:
# [可选] 超时时间
timeout: 10000
# mysql数据源
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/wvp273数据库统合?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&serverTimezone=PRC&useSSL=false&allowMultiQueries=true&allowPublicKeyRetrieval=true
username: root
password: 12345678
url: jdbc:mysql://127.0.0.1:3306/wvp?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&serverTimezone=PRC&useSSL=false&allowMultiQueries=true&allowPublicKeyRetrieval=true
username: wvp_user
password: wvp_password
# h2数据库
# datasource:
# driver-class-name: org.h2.Driver
@@ -82,11 +82,11 @@ sip:
media:
id: zlmediakit-local
# [必须修改] zlm服务器的内网IP
ip: 192.168.1.10
ip: 127.0.0.1
# [必须修改] zlm服务器的http.port
http-port: 9092
http-port: 6080
# [必选选] zlm服务器的hook.admin_params=secret
secret: TWSYFgYJOQWB4ftgeYut8DW4wbs7pQnj
secret: su6TiedN2rVAmBbIDX0aa0QTiBJLBdcf
# 启用多端口模式, 多端口模式使用端口区分每路流,兼容性更好。 单端口使用流的ssrc区分 点播超时建议使用多端口测试
rtp:
# [可选] 是否启用多端口模式, 开启后会在portRange范围内选择端口用于媒体流传输

View File

@@ -2,4 +2,4 @@ spring:
application:
name: wvp
profiles:
active: 274-dev
active: dev