diff --git a/DOCKERFILE b/DOCKERFILE index a87279e4..e8b5ecf5 100644 --- a/DOCKERFILE +++ b/DOCKERFILE @@ -68,6 +68,7 @@ RUN mkdir -p /opt/media && \ cd build && \ cmake -DCMAKE_BUILD_TYPE=Release .. && \ make -j4 && \ + rm -rf ../release/linux/Release/config.ini && \ cp -r ../release/linux/Release/* /opt/media && \ mkdir -p /opt/media/www/record @@ -89,7 +90,7 @@ RUN echo '#!/bin/bash' > run.sh && \ echo 'nohup /opt/media/MediaServer -d -m 3 &' >> run.sh && \ echo 'cd /opt/wvp' >> run.sh && \ echo 'if [${WVP_CONFIG}]; then' >> run.sh && \ - echo ' java -jar *.jar --spring.config.location=/opt/wvp/config/application.yml --media.record-assist-port=18081 ${WVP_CONFIG}' >> run.sh && \ + echo ' java -jar *.jar --spring.confi g.location=/opt/wvp/config/application.yml --media.record-assist-port=18081 ${WVP_CONFIG}' >> run.sh && \ echo 'else' >> run.sh && \ echo ' java -jar *.jar --spring.config.location=/opt/wvp/config/application.yml --media.record-assist-port=18081 --media.ip=127.0.0.1 --media.sdp-ip=${WVP_IP} --sip.ip=${WVP_IP} --media.stream-ip=${WVP_IP}' >> run.sh && \ echo 'fi' >> run.sh diff --git a/src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java b/src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java index e6083614..20339a92 100644 --- a/src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java +++ b/src/main/java/com/genersoft/iot/vmp/conf/MediaConfig.java @@ -93,7 +93,11 @@ public class MediaConfig{ } public String getSipIp() { - return sipIp; + if (sipIp == null) { + return this.ip; + }else { + return sipIp; + } } public int getHttpPort() { @@ -183,13 +187,13 @@ public class MediaConfig{ mediaServerItem.setIp(ip); mediaServerItem.setDefaultServer(true); mediaServerItem.setHookIp(getHookIp()); - mediaServerItem.setSdpIp(sdpIp); - mediaServerItem.setStreamIp(streamIp); + mediaServerItem.setSdpIp(getSdpIp()); + mediaServerItem.setStreamIp(getStreamIp()); mediaServerItem.setHttpPort(httpPort); mediaServerItem.setHttpSSlPort(httpSSlPort); mediaServerItem.setRtmpPort(rtmpPort); mediaServerItem.setRtmpSSlPort(rtmpSSlPort); - mediaServerItem.setRtpProxyPort(rtpProxyPort); + mediaServerItem.setRtpProxyPort(getRtpProxyPort()); mediaServerItem.setRtspPort(rtspPort); mediaServerItem.setRtspSSLPort(rtspSSLPort); mediaServerItem.setAutoConfig(autoConfig);