From 822cca7d3945410a8a1ab445ec315e6cdcfaa376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Sat, 28 Apr 2018 17:42:37 +0200 Subject: [PATCH] xmpp: add ability to customize the XMPP MUC domain --- docker-compose.yml | 2 ++ env.example | 3 +++ prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua | 2 +- prosody/rootfs/etc/cont-init.d/10-config | 1 + web/rootfs/etc/cont-init.d/10-config | 1 + 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 50b6c58..29040ab 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,6 +14,7 @@ services: - XMPP_DOMAIN - XMPP_AUTH_DOMAIN - XMPP_BOSH_URL_BASE + - XMPP_MUC_DOMAIN - TZ networks: meet.jitsi: @@ -30,6 +31,7 @@ services: environment: - XMPP_DOMAIN - XMPP_AUTH_DOMAIN + - XMPP_MUC_DOMAIN - JICOFO_COMPONENT_SECRET - JVB_COMPONENT_SECRET - JICOFO_AUTH_USER diff --git a/env.example b/env.example index f21aa99..9d85b3d 100644 --- a/env.example +++ b/env.example @@ -14,6 +14,9 @@ XMPP_AUTH_DOMAIN=auth.meet.jitsi # XMPP BOSH URL base. You generally don't need to change this. XMPP_BOSH_URL_BASE=http://xmpp.meet.jitsi:5280 +# XMPP domain for the MUC. You generally don't need to change this. +XMPP_MUC_DOMAIN=muc.meet.jitsi + # XMPP component password for Jitsi Videobridge. JVB_COMPONENT_SECRET=s3cr3t diff --git a/prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua b/prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua index 8604cd0..23c5e3b 100644 --- a/prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua +++ b/prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua @@ -21,7 +21,7 @@ VirtualHost "${XMPP_AUTH_DOMAIN}" } authentication = "internal_plain" -Component "conference.${XMPP_DOMAIN}" "muc" +Component "${XMPP_MUC_DOMAIN}" "muc" storage = "null" Component "jitsi-videobridge.${XMPP_DOMAIN}" diff --git a/prosody/rootfs/etc/cont-init.d/10-config b/prosody/rootfs/etc/cont-init.d/10-config index 07e5524..bc1d700 100644 --- a/prosody/rootfs/etc/cont-init.d/10-config +++ b/prosody/rootfs/etc/cont-init.d/10-config @@ -12,6 +12,7 @@ if [[ ! -f $PROSODY_CFG ]]; then sed -i \ -e "s,\${XMPP_DOMAIN},$XMPP_DOMAIN,g" \ -e "s,\${XMPP_AUTH_DOMAIN},$XMPP_AUTH_DOMAIN,g" \ + -e "s,\${XMPP_MUC_DOMAIN},$XMPP_MUC_DOMAIN,g" \ -e "s,\${JICOFO_AUTH_USER},$JICOFO_AUTH_USER,g" \ -e "s,\${JICOFO_COMPONENT_SECRET},$JICOFO_COMPONENT_SECRET,g" \ -e "s,\${JVB_COMPONENT_SECRET},$JVB_COMPONENT_SECRET,g" \ diff --git a/web/rootfs/etc/cont-init.d/10-config b/web/rootfs/etc/cont-init.d/10-config index 744e7dd..7112c75 100644 --- a/web/rootfs/etc/cont-init.d/10-config +++ b/web/rootfs/etc/cont-init.d/10-config @@ -25,6 +25,7 @@ if [[ ! -f /config/config.js ]]; then sed -i \ -e "s#jitsi-meet.example.com#$XMPP_DOMAIN#g" \ -e "s#bosh:.*#bosh: '/http-bind',#" \ + -e "s#muc:.*#muc: '${XMPP_MUC_DOMAIN}',#" \ -e "s#// focusUserJid:.*#focusUserJid: '${JICOFO_AUTH_USER}@${XMPP_AUTH_DOMAIN}',#" \ /config/config.js fi