[type]Update manifest for Task#9465

This commit is contained in:
kjg 2021-09-14 18:02:25 +02:00
parent 8948f48cd1
commit 2153fb6731

View file

@ -176,12 +176,38 @@ require="__package/nginx" __file /etc/nginx/sites-enabled/synapse-upstreams \
$("$__type"/files/nginx-upstream-config.sh)
EOF
require="__package/nginx __file/etc/nginx/sites-enabled/synapse-upstreams" \
if [ -f "$__object/parameter/synapse-worker-mode" ]; then
require="__package/nginx __file/etc/nginx/sites-enabled/synapse-upstreams" \
__ungleich_nginx_vhost "$synapse_domain" \
--listen '443 [::]:443' \
--rules "$(cat << EOF
##worker
include /etc/nginx/conf.d/generic_worker.conf;
location ~* /_synapse/metrics {
proxy_pass http://localhost:9000;
include /etc/nginx/conf.d/synapse-proxy.conf;
}
##
location ~* ^(/_matrix|/_synapse) {
proxy_pass http://localhost:8008;
include /etc/nginx/conf.d/synapse-proxy.conf;
}
location / {
proxy_pass http://localhost:8008;
include /etc/nginx/conf.d/synapse-proxy.conf;
}
EOF
)"
else
require="__package/nginx __file/etc/nginx/sites-enabled/synapse-upstreams" \
__ungleich_nginx_static_site "$synapse_domain" \
--owner "$www_directory_owner" \
--listen '443 [::]:443' \
--base_directory "$nginx_basedir" \
--locationopt "$("$__type"/files/nginx-vhost-config.sh)"
fi
# Delegate Matrix federation to port 443 & configure server discovery from
# clients if matrix_domain is element_domain (= both are handled by this