From dc374d363324645a43c8eda5c0115a958ccacdd4 Mon Sep 17 00:00:00 2001 From: Aaron van Meerten Date: Wed, 5 Jun 2019 19:55:51 -0500 Subject: [PATCH] prosody: tpl main prosody.cfg.lua --- prosody/rootfs/defaults/prosody.cfg.lua | 12 +++++++++++- prosody/rootfs/etc/cont-init.d/10-config | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/prosody/rootfs/defaults/prosody.cfg.lua b/prosody/rootfs/defaults/prosody.cfg.lua index 7ec5036..c3fb072 100644 --- a/prosody/rootfs/defaults/prosody.cfg.lua +++ b/prosody/rootfs/defaults/prosody.cfg.lua @@ -1,3 +1,5 @@ +{{ $LOG_LEVEL := .Env.LOG_LEVEL | default "info" }} + -- Prosody Example Configuration File -- -- Information on configuring Prosody can be found on our @@ -70,6 +72,9 @@ modules_enabled = { --"watchregistrations"; -- Alert admins of registrations --"motd"; -- Send a message to users when they log in --"legacyauth"; -- Legacy authentication. Only used by some old clients and bots. + {{ if .Env.GLOBAL_MODULES }} + "{{ join "\";\n\"" (splitList "," .Env.GLOBAL_MODULES) }}"; + {{ end }} }; https_ports = { } @@ -143,9 +148,14 @@ authentication = "internal_plain" -- Logs info and higher to /var/log -- Logs errors to syslog also log = { - { levels = {min = "info"}, to = "console"}; + { levels = {min = "{{ $LOG_LEVEL }}"}, to = "console"}; } +{{ if .Env.GLOBAL_CONFIG }} +{{ join ";\n" (splitList "," .Env.GLOBAL_CONFIG) }}; +{{ end }} + + component_interface = { "*" } data_path = "/config/data" diff --git a/prosody/rootfs/etc/cont-init.d/10-config b/prosody/rootfs/etc/cont-init.d/10-config index 2578f18..d334eaa 100644 --- a/prosody/rootfs/etc/cont-init.d/10-config +++ b/prosody/rootfs/etc/cont-init.d/10-config @@ -31,6 +31,7 @@ fi if [[ ! -f $PROSODY_CFG ]]; then cp -r /defaults/* /config + tpl /defaults/prosody.cfg.lua > $PROSODY_CFG tpl /defaults/conf.d/jitsi-meet.cfg.lua > /config/conf.d/jitsi-meet.cfg.lua prosodyctl --config $PROSODY_CFG register $JICOFO_AUTH_USER $XMPP_AUTH_DOMAIN $JICOFO_AUTH_PASSWORD