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,10 +1,10 @@
(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,

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 \
&& 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

View File

@ -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