xmpp: add ability to add custom prosody modules

This commit is contained in:
Paul Tiedtke
2019-01-15 14:29:50 +01:00
committed by Saúl Ibarra Corretgé
parent fb1fdb1d53
commit 95a55915b7
5 changed files with 31 additions and 5 deletions

View File

@@ -10,5 +10,4 @@ COPY rootfs/ /
EXPOSE 5222 5269 5347 5280
VOLUME /config
VOLUME ["/config", "/prosody-plugins-custom"]

View File

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