diff --git a/README.md b/README.md index e361118..97a34df 100644 --- a/README.md +++ b/README.md @@ -153,6 +153,9 @@ Variable | Description | Default value `XMPP_MUC_DOMAIN` | XMPP domain for the MUC | muc.meet.jitsi `XMPP_INTERNAL_MUC_DOMAIN` | XMPP domain for the internal MUC | internal-muc.meet.jitsi `XMPP_GUEST_DOMAIN` | XMPP domain for unauthenticated users | guest.meet.jitsi +`XMPP_MODULES` | Custom Prosody modules for XMPP_DOMAIN (comma separated) | mod_info,mod_alert +`XMPP_MUC_MODULES` | Custom Prosody modules for MUC component (comma separated) | mod_info,mod_alert +`XMPP_INTERNAL_MUC_MODULES` | Custom Prosody modules for internal MUC component (comma separated) | mod_info,mod_alert `JICOFO_COMPONENT_SECRET` | XMPP component password for Jicofo | s3cr37 `JICOFO_AUTH_USER` | XMPP user for Jicofo client connections | focus `JICOFO_AUTH_PASSWORD` | XMPP password for Jicofo client connections | passw0rd diff --git a/docker-compose.yml b/docker-compose.yml index 2aaff7d..a878eb7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -44,6 +44,9 @@ services: - XMPP_GUEST_DOMAIN - XMPP_MUC_DOMAIN - XMPP_INTERNAL_MUC_DOMAIN + - XMPP_MODULES + - XMPP_MUC_MODULES + - XMPP_INTERNAL_MUC_MODULES - JICOFO_COMPONENT_SECRET - JICOFO_AUTH_USER - JICOFO_AUTH_PASSWORD diff --git a/env.example b/env.example index 5d9be57..a0602ba 100644 --- a/env.example +++ b/env.example @@ -81,6 +81,15 @@ XMPP_INTERNAL_MUC_DOMAIN=internal-muc.meet.jitsi # XMPP domain for unauthenticated users. XMPP_GUEST_DOMAIN=guest.meet.jitsi +# Custom Prosody modules for XMPP_DOMAIN (comma separated) +XMPP_MODULES= + +# Custom Prosody modules for MUC component (comma separated) +XMPP_MUC_MODULES= + +# Custom Prosody modules for internal MUC component (comma separated) +XMPP_INTERNAL_MUC_MODULES= + # MUC for the JVB pool. JVB_BREWERY_MUC=jvbbrewery diff --git a/prosody/Dockerfile b/prosody/Dockerfile index 9bbc137..c5a0aa6 100644 --- a/prosody/Dockerfile +++ b/prosody/Dockerfile @@ -10,5 +10,4 @@ COPY rootfs/ / EXPOSE 5222 5269 5347 5280 -VOLUME /config - +VOLUME ["/config", "/prosody-plugins-custom"] diff --git a/prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua b/prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua index 5529094..3707150 100644 --- a/prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua +++ b/prosody/rootfs/defaults/conf.d/jitsi-meet.cfg.lua @@ -1,4 +1,5 @@ admins = { "{{ .Env.JICOFO_AUTH_USER }}@{{ .Env.XMPP_AUTH_DOMAIN }}" } +plugin_paths = { "/prosody-plugins-custom" } VirtualHost "{{ .Env.XMPP_DOMAIN }}" {{ if .Env.ENABLE_AUTH }} @@ -7,13 +8,16 @@ VirtualHost "{{ .Env.XMPP_DOMAIN }}" authentication = "anonymous" {{ end }} ssl = { - key = "/config/certs/{{ .Env.XMPP_DOMAIN }}.key"; - certificate = "/config/certs/{{ .Env.XMPP_DOMAIN }}.crt"; + key = "/config/certs/{{ .Env.XMPP_DOMAIN }}.key"; + certificate = "/config/certs/{{ .Env.XMPP_DOMAIN }}.crt"; } modules_enabled = { "bosh"; "pubsub"; "ping"; + {{ if .Env.XMPP_MODULES }} + "{{ join "\";\n\"" (splitList "," .Env.XMPP_MODULES) }}"; + {{ end }} } c2s_require_encryption = false @@ -33,13 +37,21 @@ VirtualHost "{{ .Env.XMPP_AUTH_DOMAIN }}" Component "{{ .Env.XMPP_INTERNAL_MUC_DOMAIN }}" "muc" modules_enabled = { - "ping"; + "ping"; + {{ if .Env.XMPP_INTERNAL_MUC_MODULES }} + "{{ join "\";\n\"" (splitList "," .Env.XMPP_INTERNAL_MUC_MODULES) }}"; + {{ end }} } storage = "internal" muc_room_cache_size = 1000 Component "{{ .Env.XMPP_MUC_DOMAIN }}" "muc" storage = "internal" + modules_enabled = { + {{ if .Env.XMPP_MUC_MODULES }} + "{{ join "\";\n\"" (splitList "," .Env.XMPP_MUC_MODULES) }}"; + {{ end }} + } Component "focus.{{ .Env.XMPP_DOMAIN }}" component_secret = "{{ .Env.JICOFO_COMPONENT_SECRET }}"