homeserver-iac/roles/caddy/templates/Caddyfile.j2

59 lines
1.1 KiB
Caddyfile
Raw Normal View History

2023-09-03 20:50:07 -04:00
{
{% if email is not none %}
email {{ email }}
{% endif %}
}
{% if dyndns_domain != domain %}
{{ dyndns_domain }} {
redir https://www.{{ domain }} 302
}
{% endif %}
(external) {
@external not remote_ip {{ internal_cidr }}
}
2024-03-03 09:59:07 -05:00
import conf.d/*
2023-08-23 17:31:22 -04:00
{% if "website" in group_names %}
www.{{ domain }} {
root * {{ website_path }}
file_server
}
{% endif %}
2023-08-28 20:34:25 -04:00
2023-09-03 20:50:07 -04:00
{% if groups["gitea"] | length > 0 %}
{{ gitea_domain }} {
2023-08-28 20:34:25 -04:00
reverse_proxy {{ groups["gitea"][0] }}:3000
}
{% endif %}
2023-09-04 18:27:08 -04:00
{% if groups["navidrome"] | length > 0 %}
{{ navidrome_domain }} {
import external
respond @external 403
2023-09-04 18:27:08 -04:00
reverse_proxy {{ groups["navidrome"][0] }}:4533
}
{% endif %}
2023-09-07 21:47:16 -04:00
{% if groups["synapse"] | length > 0 %}
{{ matrix_domain }} {
2023-09-07 21:47:16 -04:00
reverse_proxy /_matrix/* {{ groups["synapse"][0] }}:8008
reverse_proxy /_synapse/client/* {{ groups["synapse"][0] }}:8008
}
2023-09-09 09:05:05 -04:00
{{ matrix_domain }}:8448 {
2023-09-07 21:47:16 -04:00
reverse_proxy /_matrix/* {{ groups["synapse"][0] }}:8008
}
{% endif %}
2023-12-09 21:36:36 -05:00
{% if groups["paperless"] | length > 0 %}
{{ paperless_domain }} {
import external
respond @external 403
2023-12-09 21:36:36 -05:00
reverse_proxy {{ groups["paperless"][0] }}:8000
}
{% endif %}