From b78d665d7263a8f38f24146c50197d36e7af18ad Mon Sep 17 00:00:00 2001 From: xiaoxie Date: Wed, 1 Dec 2021 22:45:38 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=A7=E7=BB=AD=E4=BC=98=E5=8C=96docker?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=EF=BC=9A=201.=E5=90=AF=E5=8A=A8=E5=91=BD?= =?UTF-8?q?=E4=BB=A4=E5=A2=9E=E5=8A=A0ASSIST=5FJVM=5FCONFIG=E5=92=8CWVP=5F?= =?UTF-8?q?JVM=5FCONFIG=E4=B8=A4=E4=B8=AA=E5=AD=97=E6=AE=B5=EF=BC=8C?= =?UTF-8?q?=E6=96=B9=E4=BE=BF=E9=85=8D=E7=BD=AEJVM=E5=8F=82=E6=95=B0=202.?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E5=A4=84=E9=94=99=E8=AF=AF=EF=BC=8C?= =?UTF-8?q?application.yml=20media.stream-ip=E7=9A=84=E5=80=BC=E5=BA=94?= =?UTF-8?q?=E8=AF=A5=E7=AD=89=E4=BA=8Emedia.ip=E8=80=8C=E4=B8=8D=E6=98=AF?= =?UTF-8?q?=E4=B9=8B=E5=89=8D=E7=9A=84sip.ip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/docker-compose.yml | 2 ++ docker/wvp/Dockerfile | 4 ++-- src/main/resources/application-docker.yml | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 524356bc..3da521a9 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -41,6 +41,8 @@ services: REDIS_PORT: 6379 REDIS_DB: 6 REDIS_PWD: root + ASSIST_JVM_CONFIG: -Xms128m -Xmx256m + WVP_JVM_CONFIG: -Xms128m -Xmx256m ASSIST_CONFIG: WVP_CONFIG: depends_on: diff --git a/docker/wvp/Dockerfile b/docker/wvp/Dockerfile index ca9ef21e..34e3babb 100644 --- a/docker/wvp/Dockerfile +++ b/docker/wvp/Dockerfile @@ -47,10 +47,10 @@ RUN cd /opt/wvp && \ echo 'echo ${WVP_IP}' >> run.sh && \ echo 'echo ${WVP_CONFIG}' >> run.sh && \ echo 'cd /opt/assist' >> run.sh && \ - echo 'nohup java -Xms128m -Xmx256m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/assist/heapdump/ -jar *.jar --spring.config.location=/opt/assist/config/application.yml --userSettings.record=/opt/media/www/record/ --media.record-assist-port=18081 ${ASSIST_CONFIG} &' >> run.sh && \ + echo 'nohup java ${ASSIST_JVM_CONFIG} -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/assist/heapdump/ -jar *.jar --spring.config.location=/opt/assist/config/application.yml --userSettings.record=/opt/media/www/record/ --media.record-assist-port=18081 ${ASSIST_CONFIG} &' >> run.sh && \ echo 'nohup /opt/media/MediaServer -d -m 3 &' >> run.sh && \ echo 'cd /opt/wvp' >> run.sh && \ - echo 'java -Xms128m -Xmx256m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/wvp/heapdump/ -jar *.jar --spring.config.location=/opt/wvp/config/application.yml --media.record-assist-port=18081 ${WVP_CONFIG}' >> run.sh && \ + echo 'java ${WVP_JVM_CONFIG} -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/wvp/heapdump/ -jar *.jar --spring.config.location=/opt/wvp/config/application.yml --media.record-assist-port=18081 ${WVP_CONFIG}' >> run.sh && \ chmod +x run.sh FROM ubuntu:20.04 diff --git a/src/main/resources/application-docker.yml b/src/main/resources/application-docker.yml index ff60f5af..e8f2c713 100644 --- a/src/main/resources/application-docker.yml +++ b/src/main/resources/application-docker.yml @@ -8,7 +8,7 @@ spring: # [可选] 数据库 DB database: ${REDIS_DB:6} # [可选] 访问密码,若你的redis服务器没有设置密码,就不需要用密码去连接 - password: ${REDIS_PWD:} + password: ${REDIS_PWD:root} # [可选] 超时时间 timeout: 10000 # [可选] jdbc数据库配置, 项目使用sqlite作为数据库,一般不需要配置 @@ -67,7 +67,7 @@ media: send-port-range: 30000,30500 # 端口范围 # 录像辅助服务, 部署此服务可以实现zlm录像的管理与下载, 0 表示不使用 record-assist-port: 18081 - sdp-ip: ${sip.ip} + sdp-ip: ${media.ip} stream-ip: ${sip.ip} # [可选] 日志配置, 一般不需要改 logging: @@ -85,7 +85,7 @@ logging: user-settings: # 推流直播是否录制 record-push-live: true - auto-apply-play: false + auto-apply-play: true # 在线文档: swagger-ui(生产环境建议关闭) swagger-ui: