mirror of https://github.com/OpenVidu/openvidu.git
Default google KMS_STUN_IP and KMS_STUN_PORT added to openvidu-server-kms Dockerfile
parent
7724e547cf
commit
b4f83448d2
|
@ -1,4 +1,4 @@
|
|||
(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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,16 +1,20 @@
|
|||
#!/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
|
||||
KMS_STUN_IP_AUX="${KMS_STUN_IP}"
|
||||
KMS_STUN_PORT_AUX="${KMS_STUN_PORT}"
|
||||
fi
|
||||
|
||||
# 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
|
||||
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
|
||||
cat /etc/hosts | sed '/::1/d' | tee /etc/hosts > /dev/null
|
||||
|
|
Loading…
Reference in New Issue