prosody: tpl main prosody.cfg.lua

This commit is contained in:
Aaron van Meerten
2019-06-05 19:55:51 -05:00
parent d6a949ca63
commit dc374d3633
2 changed files with 12 additions and 1 deletions

View File

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

View File

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