core: rework templating
Use frep [0] which uses the Go templating capabilities. [0]: https://github.com/subchen/frep
This commit is contained in:
@@ -31,8 +31,8 @@ server {
|
||||
|
||||
# BOSH
|
||||
location /http-bind {
|
||||
proxy_pass ${XMPP_BOSH_URL_BASE}/http-bind;
|
||||
proxy_pass {{ .Env.XMPP_BOSH_URL_BASE }}/http-bind;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header Host ${XMPP_DOMAIN};
|
||||
proxy_set_header Host {{ .Env.XMPP_DOMAIN }};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,11 +13,7 @@ if [[ ! -f /config/nginx/nginx.conf ]]; then
|
||||
fi
|
||||
|
||||
if [[ ! -f /config/nginx/site-confs/default ]]; then
|
||||
cp /defaults/default /config/nginx/site-confs/default
|
||||
sed -i \
|
||||
-e "s,\${XMPP_DOMAIN},$XMPP_DOMAIN,g" \
|
||||
-e "s,\${XMPP_BOSH_URL_BASE},$XMPP_BOSH_URL_BASE,g" \
|
||||
/config/nginx/site-confs/default
|
||||
tpl /defaults/default > /config/nginx/site-confs/default
|
||||
fi
|
||||
|
||||
if [[ ! -f /config/config.js ]]; then
|
||||
|
||||
Reference in New Issue
Block a user