cluster/nomad/regions/do-1/ingress-upstreams.conf
main b6b9e09535 Matrix setup
Signed-off-by: main <magic_rb@redalder.org>
2022-10-27 11:41:34 +02:00

118 lines
2 KiB
Plaintext

upstream gitea {
server {{ env "NOMAD_UPSTREAM_ADDR_gitea" }};
}
upstream hydra {
server {{ env "NOMAD_UPSTREAM_ADDR_hydra" }};
}
upstream nextcloud {
server {{ env "NOMAD_UPSTREAM_ADDR_nextcloud" }};
}
upstream website {
server {{ env "NOMAD_UPSTREAM_ADDR_website" }};
}
upstream reicio {
server {{ env "NOMAD_UPSTREAM_ADDR_reicio" }};
}
upstream matrix-synapse {
server {{ env "NOMAD_UPSTREAM_ADDR_matrix_synapse" }};
}
upstream matrix-mautrix-facebook {
server {{ env "NOMAD_UPSTREAM_ADDR_matrix-mautrix-facebook" }};
}
server {
listen 443 ssl http2;
server_name _;
include /local/ssl.conf;
return 404;
}
server {
listen 443 ssl http2;
server_name gitea.redalder.org;
include /local/security.conf;
include /local/ssl.conf;
client_max_body_size 100M;
location / {
include /local/headers.conf;
proxy_pass http://gitea;
}
}
server {
listen 443 ssl http2;
server_name hydra.redalder.org;
include /local/security.conf;
include /local/ssl.conf;
location / {
include /local/headers.conf;
proxy_pass http://hydra;
}
}
server {
listen 443 ssl http2;
server_name redalder.org nixng.org;
include /local/security.conf;
include /local/ssl.conf;
location /nextcloud/ {
include /local/headers.conf;
proxy_pass http://nextcloud/;
}
location /reicio/ {
include /local/headers.conf;
proxy_pass http://reicio/;
}
location / {
include /local/headers.conf;
proxy_pass http://website;
}
}
server {
listen 443 ssl http2;
listen 8448 ssl http2;
server_name matrix.redalder.org;
merge_slashes off;
location /_matrix/ {
proxy_pass http://matrix-synapse$request_uri;
proxy_set_header Host $http_host;
proxy_buffering off;
}
location /mufb/ {
proxy_pass http://matrix-mautrix-facebook$request_uri;
proxy_set_header Host $http_host;
proxy_buffering off;
}
location / {
return 404;
}
include /local/security.conf;
include /local/ssl.conf;
}