jvb: add ability to disable XMPP

In case the REST API is the only API that is going to be used.
pull/1805/head
Saúl Ibarra Corretgé 6 months ago
parent 77ce86a995
commit 79a4635ed2
  1. 1
      docker-compose.yml
  2. 5
      jvb/rootfs/defaults/jvb.conf
  3. 32
      jvb/rootfs/etc/cont-init.d/10-config

@ -424,6 +424,7 @@ services:
- JVB_AUTH_PASSWORD - JVB_AUTH_PASSWORD
- JVB_BREWERY_MUC - JVB_BREWERY_MUC
- JVB_DISABLE_STUN - JVB_DISABLE_STUN
- JVB_DISABLE_XMPP
- JVB_INSTANCE_ID - JVB_INSTANCE_ID
- JVB_PORT - JVB_PORT
- JVB_MUC_NICKNAME - JVB_MUC_NICKNAME

@ -1,4 +1,5 @@
{{ $COLIBRI_REST_ENABLED := .Env.COLIBRI_REST_ENABLED | default "false" | toBool -}} {{ $COLIBRI_REST_ENABLED := .Env.COLIBRI_REST_ENABLED | default "false" | toBool -}}
{{ $DISABLE_XMPP := .Env.JVB_DISABLE_XMPP | default "0" | toBool -}}
{{ $ENABLE_COLIBRI_WEBSOCKET := .Env.ENABLE_COLIBRI_WEBSOCKET | default "1" | toBool -}} {{ $ENABLE_COLIBRI_WEBSOCKET := .Env.ENABLE_COLIBRI_WEBSOCKET | default "1" | toBool -}}
{{ $ENABLE_OCTO := .Env.ENABLE_OCTO | default "0" | toBool -}} {{ $ENABLE_OCTO := .Env.ENABLE_OCTO | default "0" | toBool -}}
{{ $ENABLE_SCTP := .Env.ENABLE_SCTP | default "0" | toBool -}} {{ $ENABLE_SCTP := .Env.ENABLE_SCTP | default "0" | toBool -}}
@ -37,6 +38,7 @@ videobridge {
advertise-private-candidates = {{ $JVB_ADVERTISE_PRIVATE_CANDIDATES }} advertise-private-candidates = {{ $JVB_ADVERTISE_PRIVATE_CANDIDATES }}
} }
apis { apis {
{{ if not $DISABLE_XMPP -}}
xmpp-client { xmpp-client {
configs { configs {
{{ if $ENABLE_JVB_XMPP_SERVER }} {{ if $ENABLE_JVB_XMPP_SERVER }}
@ -67,9 +69,10 @@ videobridge {
DISABLE_CERTIFICATE_VERIFICATION = true DISABLE_CERTIFICATE_VERIFICATION = true
} }
{{ end -}} {{ end -}}
{{ end }} {{ end -}}
} }
} }
{{ end -}}
rest { rest {
enabled = {{ $COLIBRI_REST_ENABLED }} enabled = {{ $COLIBRI_REST_ENABLED }}
} }

@ -1,17 +1,24 @@
#!/usr/bin/with-contenv bash #!/usr/bin/with-contenv bash
if [[ -z $JVB_AUTH_PASSWORD ]]; then if [[ -z $JVB_DISABLE_XMPP ]]; then
echo 'FATAL ERROR: JVB auth password must be set' if [[ -z $JVB_AUTH_PASSWORD ]]; then
exit 1 echo 'FATAL ERROR: JVB auth password must be set'
fi exit 1
fi
OLD_JVB_AUTH_PASSWORD=passw0rd OLD_JVB_AUTH_PASSWORD=passw0rd
if [[ "$JVB_AUTH_PASSWORD" == "$OLD_JVB_AUTH_PASSWORD" ]]; then if [[ "$JVB_AUTH_PASSWORD" == "$OLD_JVB_AUTH_PASSWORD" ]]; then
echo 'FATAL ERROR: JVB auth password must be changed, check the README' echo 'FATAL ERROR: JVB auth password must be changed, check the README'
exit 1 exit 1
fi fi
[ -z "${XMPP_SERVER}" ] && export XMPP_SERVER=xmpp.meet.jitsi [ -z "${XMPP_SERVER}" ] && export XMPP_SERVER=xmpp.meet.jitsi
# 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})
export JVB_WS_SERVER_ID_FALLBACK=$(ip route get ${XMPP_SERVER_IP} | grep -oP '(?<=src ).*' | awk '{ print $1 '})
fi
# Migration from DOCKER_HOST_ADDRESS to JVB_ADVERTISE_IPS # Migration from DOCKER_HOST_ADDRESS to JVB_ADVERTISE_IPS
if [[ -z "${JVB_ADVERTISE_IPS}" ]]; then if [[ -z "${JVB_ADVERTISE_IPS}" ]]; then
@ -21,11 +28,6 @@ if [[ -z "${JVB_ADVERTISE_IPS}" ]]; then
fi fi
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})
export JVB_WS_SERVER_ID_FALLBACK=$(ip route get ${XMPP_SERVER_IP} | grep -oP '(?<=src ).*' | awk '{ print $1 '})
# Local IP for the ice4j mapping harvester. # Local IP for the ice4j mapping harvester.
export LOCAL_ADDRESS=$(ip route get 1 | grep -oP '(?<=src ).*' | awk '{ print $1 '}) export LOCAL_ADDRESS=$(ip route get 1 | grep -oP '(?<=src ).*' | awk '{ print $1 '})

Loading…
Cancel
Save