From b4f83448d2f78eb6bd25529594ed8f1db07556ce Mon Sep 17 00:00:00 2001 From: pabloFuente Date: Thu, 26 Apr 2018 11:19:15 +0200 Subject: [PATCH] Default google KMS_STUN_IP and KMS_STUN_PORT added to openvidu-server-kms Dockerfile --- openvidu-server/NOTICE | 6 +++--- .../docker/openvidu-server-kms/Dockerfile | 5 +++-- .../docker/openvidu-server-kms/kms.sh | 18 +++++++++++------- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/openvidu-server/NOTICE b/openvidu-server/NOTICE index b7393e6f..c3551b7e 100644 --- a/openvidu-server/NOTICE +++ b/openvidu-server/NOTICE @@ -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"); you may not use this file except in compliance with the License. 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 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and -limitations under the License. +limitations under the License. \ No newline at end of file diff --git a/openvidu-server/docker/openvidu-server-kms/Dockerfile b/openvidu-server/docker/openvidu-server-kms/Dockerfile index 57242800..fac3986e 100644 --- a/openvidu-server/docker/openvidu-server-kms/Dockerfile +++ b/openvidu-server/docker/openvidu-server-kms/Dockerfile @@ -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 \ && rm -rf /var/lib/apt/lists/* -COPY kms.sh /kms.sh - # Install Java 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.jar openvidu-server.jar +# Copy KMS entrypoint +COPY kms.sh /kms.sh + EXPOSE 8888 EXPOSE 9091 EXPOSE 4443 diff --git a/openvidu-server/docker/openvidu-server-kms/kms.sh b/openvidu-server/docker/openvidu-server-kms/kms.sh index 204d963d..a86ae539 100644 --- a/openvidu-server/docker/openvidu-server-kms/kms.sh +++ b/openvidu-server/docker/openvidu-server-kms/kms.sh @@ -1,15 +1,19 @@ #!/bin/bash -x 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 - # Generate WebRtcEndpoint configuration - echo "stunServerAddress=$KMS_STUN_IP" > /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini - echo "stunServerPort=$KMS_STUN_PORT" >> /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini - if [ -n "$KMS_TURN_URL" ]; then + KMS_STUN_IP_AUX="${KMS_STUN_IP}" + KMS_STUN_PORT_AUX="${KMS_STUN_PORT}" +fi + +# 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 - fi -elif [ -n "$KMS_TURN_URL" ]; then - echo "turnURL=$KMS_TURN_URL" > /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini fi # Remove ipv6 local loop until ipv6 is supported