jvb: run it on the user defined network

This commit is contained in:
Saúl Ibarra Corretgé
2018-03-25 10:36:35 +02:00
parent 67243fbdcb
commit 8e4325829b
3 changed files with 15 additions and 4 deletions

View File

@@ -1,3 +1,5 @@
org.jitsi.videobridge.AUTHORIZED_SOURCE_REGEXP=${JICOFO_AUTH_USER}@auth.${XMPP_DOMAIN}/.*
org.jitsi.videobridge.TCP_HARVESTER_PORT=4443
org.ice4j.ice.harvest.STUN_MAPPING_HARVESTER_ADDRESSES=${JVB_STUN_SERVERS}
org.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS=
org.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS=

View File

@@ -13,3 +13,12 @@ if [[ ! -f /config/logging.properties ]]; then
cp /defaults/logging.properties /config
fi
# Do this for every run, since the local IP may change!
if [[ ! -z "$DOCKER_HOST_ADDRESS" ]]; then
LOCAL_ADDRESS=$(hostname -I | cut -d " " -f1)
sed -i \
-e "s,^org.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS=.*,org.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS=$LOCAL_ADDRESS," \
-e "s,^org.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS=.*,org.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS=$DOCKER_HOST_ADDRESS," \
/config/sip-communicator.properties
fi