jvb: add JVB_ADVERTISE_IPS, deprecating DOCKER_HOST_ADDRESS

The new variable has a better purposed name, and supports a comma
separated list of IPs instead of a single one, which should help those
running split-horizon setups.
This commit is contained in:
Saúl Ibarra Corretgé
2022-09-26 20:44:40 +02:00
parent 723acc20ef
commit c53de728ce
4 changed files with 19 additions and 6 deletions

View File

@@ -13,6 +13,14 @@ fi
[ -z "${XMPP_SERVER}" ] && export XMPP_SERVER=xmpp.meet.jitsi
# Migration from DOCKER_HOST_ADDRESS to JVB_ADVERTISE_IPS
if [[ -z "${JVB_ADVERTISE_IPS}" ]]; then
if [[ ! -z "${DOCKER_HOST_ADDRESS}" ]]; then
echo "WARNING: DOCKER_HOST_ADDRESS is deprecated, migrate to JVB_ADVERTISE_IPS"
export JVB_ADVERTISE_IPS=${DOCKER_HOST_ADDRESS}
fi
fi
# On environments like Swarm the IP address used by the default gateway need not be
# the one used for inter-container traffic. Use that one for our fallback ID.
XMPP_SERVER_IP=$(dig +short +search ${XMPP_SERVER})