fix kms container with configurable ws port

This commit is contained in:
Felipe Cecagno 2018-08-21 14:12:54 -03:00
parent 06e9b15358
commit b540f40f06
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,7 @@
FROM ubuntu:16.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update \
&& apt-get -y dist-upgrade \
&& apt-get install -y software-properties-common curl wget apt-transport-https

View File

@ -15,7 +15,8 @@ if [ -n "$KMS_STUN_IP" -a -n "$KMS_STUN_PORT" ]; then
echo "stunServerPort=$KMS_STUN_PORT" >> /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini
fi
cat /etc/kurento/kurento.conf.json | sed '/^[ ]*\/\//d' | jq ".mediaServer.net.websocket.port = $PORT" > /etc/kurento/kurento.conf.json
KMS_CONFIG=$(cat /etc/kurento/kurento.conf.json | sed '/^[ ]*\/\//d' | jq ".mediaServer.net.websocket.port = $PORT")
echo $KMS_CONFIG > /etc/kurento/kurento.conf.json
# Remove ipv6 local loop until ipv6 is supported
cat /etc/hosts | sed '/::1/d' | tee /etc/hosts > /dev/null