Default google KMS_STUN_IP and KMS_STUN_PORT added to openvidu-server-kms Dockerfile

pull/73/head
pabloFuente 2018-04-26 11:19:15 +02:00
parent 7724e547cf
commit b4f83448d2
3 changed files with 17 additions and 12 deletions

View File

@ -1,13 +1,13 @@
(C) Copyright 2016 Kurento (http://kurento.org) (C) Copyright 2017-2018 OpenVidu (http://openvidu.io/)
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.

View File

@ -10,8 +10,6 @@ RUN echo "deb http://ubuntu.openvidu.io/6.7.0 xenial kms6" | tee /etc/apt/source
&& apt-get -y install openh264-gst-plugins-bad-1.5 \ && apt-get -y install openh264-gst-plugins-bad-1.5 \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
COPY kms.sh /kms.sh
# Install Java # Install Java
RUN apt-get update && apt-get install -y openjdk-8-jdk && rm -rf /var/lib/apt/lists/* RUN apt-get update && apt-get install -y openjdk-8-jdk && rm -rf /var/lib/apt/lists/*
@ -25,6 +23,9 @@ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Copy OpenVidu Server # Copy OpenVidu Server
COPY openvidu-server.jar openvidu-server.jar COPY openvidu-server.jar openvidu-server.jar
# Copy KMS entrypoint
COPY kms.sh /kms.sh
EXPOSE 8888 EXPOSE 8888
EXPOSE 9091 EXPOSE 9091
EXPOSE 4443 EXPOSE 4443

View File

@ -1,15 +1,19 @@
#!/bin/bash -x #!/bin/bash -x
set -e set -e
KMS_STUN_IP_AUX="stun.l.google.com"
KMS_STUN_PORT_AUX="19302"
if [ -n "$KMS_STUN_IP" -a -n "$KMS_STUN_PORT" ]; then if [ -n "$KMS_STUN_IP" -a -n "$KMS_STUN_PORT" ]; then
# Generate WebRtcEndpoint configuration KMS_STUN_IP_AUX="${KMS_STUN_IP}"
echo "stunServerAddress=$KMS_STUN_IP" > /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini KMS_STUN_PORT_AUX="${KMS_STUN_PORT}"
echo "stunServerPort=$KMS_STUN_PORT" >> /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini fi
if [ -n "$KMS_TURN_URL" ]; then
# Generate WebRtcEndpoint configuration
echo "stunServerAddress=$KMS_STUN_IP_AUX" > /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini
echo "stunServerPort=$KMS_STUN_PORT_AUX" >> /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini
if [ -n "$KMS_TURN_URL" ]; then
echo "turnURL=$KMS_TURN_URL" >> /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini echo "turnURL=$KMS_TURN_URL" >> /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini
fi
elif [ -n "$KMS_TURN_URL" ]; then
echo "turnURL=$KMS_TURN_URL" > /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini
fi fi
# Remove ipv6 local loop until ipv6 is supported # Remove ipv6 local loop until ipv6 is supported