core: rework templating
Use frep [0] which uses the Go templating capabilities. [0]: https://github.com/subchen/frep
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
admins = { "${JICOFO_AUTH_USER}@${XMPP_AUTH_DOMAIN}" }
|
||||
admins = { "{{ .Env.JICOFO_AUTH_USER }}@{{ .Env.XMPP_AUTH_DOMAIN }}" }
|
||||
|
||||
VirtualHost "${XMPP_DOMAIN}"
|
||||
VirtualHost "{{ .Env.XMPP_DOMAIN }}"
|
||||
authentication = "anonymous"
|
||||
ssl = {
|
||||
key = "/config/certs/${XMPP_DOMAIN}.key";
|
||||
certificate = "/config/certs/${XMPP_DOMAIN}.crt";
|
||||
key = "/config/certs/{{ .Env.XMPP_DOMAIN }}.key";
|
||||
certificate = "/config/certs/{{ .Env.XMPP_DOMAIN }}.crt";
|
||||
}
|
||||
modules_enabled = {
|
||||
"bosh";
|
||||
@@ -14,19 +14,19 @@ VirtualHost "${XMPP_DOMAIN}"
|
||||
|
||||
c2s_require_encryption = false
|
||||
|
||||
VirtualHost "${XMPP_AUTH_DOMAIN}"
|
||||
VirtualHost "{{ .Env.XMPP_AUTH_DOMAIN }}"
|
||||
ssl = {
|
||||
key = "/config/certs/${XMPP_AUTH_DOMAIN}.key";
|
||||
certificate = "/config/certs/${XMPP_AUTH_DOMAIN}.crt";
|
||||
key = "/config/certs/{{ .Env.XMPP_AUTH_DOMAIN }}.key";
|
||||
certificate = "/config/certs/{{ .Env.XMPP_AUTH_DOMAIN }}.crt";
|
||||
}
|
||||
authentication = "internal_plain"
|
||||
|
||||
Component "${XMPP_MUC_DOMAIN}" "muc"
|
||||
Component "{{ .Env.XMPP_MUC_DOMAIN }}" "muc"
|
||||
storage = "none"
|
||||
|
||||
Component "jitsi-videobridge.${XMPP_DOMAIN}"
|
||||
component_secret = "${JVB_COMPONENT_SECRET}"
|
||||
Component "jitsi-videobridge.{{ .Env.XMPP_DOMAIN }}"
|
||||
component_secret = "{{ .Env.JVB_COMPONENT_SECRET }}"
|
||||
|
||||
Component "focus.${XMPP_DOMAIN}"
|
||||
component_secret = "${JICOFO_COMPONENT_SECRET}"
|
||||
Component "focus.{{ .Env.XMPP_DOMAIN }}"
|
||||
component_secret = "{{ .Env.JICOFO_COMPONENT_SECRET }}"
|
||||
|
||||
|
||||
@@ -9,14 +9,7 @@ fi
|
||||
|
||||
if [[ ! -f $PROSODY_CFG ]]; then
|
||||
cp -r /defaults/* /config
|
||||
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" \
|
||||
/config/conf.d/jitsi-meet.cfg.lua
|
||||
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
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user