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.
pull/1412/head
Saúl Ibarra Corretgé 2 years ago
parent 723acc20ef
commit c53de728ce
  1. 1
      docker-compose.yml
  2. 5
      env.example
  3. 11
      jvb/rootfs/defaults/jvb.conf
  4. 8
      jvb/rootfs/etc/cont-init.d/10-config

@ -308,6 +308,7 @@ services:
- ENABLE_COLIBRI_WEBSOCKET
- ENABLE_OCTO
- ENABLE_MULTI_STREAM
- JVB_ADVERTISE_IPS
- JVB_ADVERTISE_PRIVATE_CANDIDATES
- JVB_AUTH_USER
- JVB_AUTH_PASSWORD

@ -30,10 +30,11 @@ TZ=UTC
# Public URL for the web service (required)
#PUBLIC_URL=https://meet.example.com
# IP address of the Docker host
# Media IP addresses to advertise by the JVB
# This setting deprecates DOCKER_HOST_ADDRESS, and supports a comma separated list of IPs
# See the "Running behind NAT or on a LAN environment" section in the Handbook:
# https://jitsi.github.io/handbook/docs/devops-guide/devops-guide-docker#running-behind-nat-or-on-a-lan-environment
#DOCKER_HOST_ADDRESS=192.168.1.1
#JVB_ADVERTISE_IPS=192.168.1.1,1.2.3.4
#

@ -8,6 +8,8 @@
{{ $JVB_BREWERY_MUC := .Env.JVB_BREWERY_MUC | default "jvbbrewery" -}}
{{ $JVB_MUC_NICKNAME := .Env.JVB_MUC_NICKNAME | default .Env.HOSTNAME -}}
{{ $JVB_ADVERTISE_PRIVATE_CANDIDATES := .Env.JVB_ADVERTISE_PRIVATE_CANDIDATES | default "true" | toBool -}}
{{ $JVB_ADVERTISE_IPS := .Env.JVB_ADVERTISE_IPS | default "" -}}
{{ $JVB_IPS := splitList "," $JVB_ADVERTISE_IPS -}}
{{ $PUBLIC_URL_DOMAIN := .Env.PUBLIC_URL | default "https://localhost:8443" | trimPrefix "https://" | trimSuffix "/" -}}
{{ $SHUTDOWN_REST_ENABLED := .Env.SHUTDOWN_REST_ENABLED | default "false" | toBool -}}
{{ $WS_DOMAIN := .Env.JVB_WS_DOMAIN | default $PUBLIC_URL_DOMAIN -}}
@ -96,11 +98,12 @@ ice4j {
{{ end -}}
}
static-mappings = [
{{ if .Env.DOCKER_HOST_ADDRESS -}}
{{ range $index, $element := $JVB_IPS -}}
{
local-address = "{{ .Env.LOCAL_ADDRESS }}"
public-address = "{{ .Env.DOCKER_HOST_ADDRESS }}"
}
local-address = "{{ $ENV.LOCAL_ADDRESS }}"
public-address = "{{ $element }}"
name = "ip-{{ $index }}"
},
{{ end -}}
]
}

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

Loading…
Cancel
Save