matrix-docker-ansible-deploy/roles/custom/matrix-conduit/templates/labels.j2
Slavi Pantaleev b2aeb8cde9 Rename label-related variables for homeservers
We'd be adding integration with an internal Traefik entrypoint
(`matrix_playbook_internal_matrix_client_api_traefik_entrypoint`),
so renaming helps disambiguate things.

There's no need for deperecation tasks, because the old names
have only been part of this `bye-bye-nginx-proxy` branch and not used by
anyone publicly.
2024-01-14 10:48:54 +02:00

98 lines
4.2 KiB
Django/Jinja

{% if matrix_conduit_container_labels_traefik_enabled %}
traefik.enable=true
{% if matrix_conduit_container_labels_traefik_docker_network %}
traefik.docker.network={{ matrix_conduit_container_labels_traefik_docker_network }}
{% endif %}
traefik.http.services.matrix-conduit.loadbalancer.server.port={{ matrix_conduit_port_number }}
{#
Public Root path (/)
#}
{% if matrix_conduit_container_labels_public_client_root_enabled %}
{% set client_root_middlewares = [] %}
{% if matrix_conduit_container_labels_public_client_root_redirection_enabled %}
{% set client_root_middlewares = client_root_middlewares + ['matrix-conduit-client-root-redirect'] %}
traefik.http.middlewares.matrix-conduit-client-root-redirect.redirectregex.regex=(.*)
traefik.http.middlewares.matrix-conduit-client-root-redirect.redirectregex.replacement={{ matrix_conduit_container_labels_public_client_root_redirection_url }}
{% endif %}
traefik.http.routers.matrix-conduit-client-root.rule={{ matrix_conduit_container_labels_public_client_root_traefik_rule }}
traefik.http.routers.matrix-conduit-client-root.middlewares={{ client_root_middlewares | join(',') }}
{% if matrix_conduit_container_labels_public_client_root_traefik_priority | int > 0 %}
traefik.http.routers.matrix-conduit-client-root.priority={{ matrix_conduit_container_labels_public_client_root_traefik_priority }}
{% endif %}
traefik.http.routers.matrix-conduit-client-root.service=matrix-conduit
traefik.http.routers.matrix-conduit-client-root.entrypoints={{ matrix_conduit_container_labels_public_client_root_traefik_entrypoints }}
traefik.http.routers.matrix-conduit-client-root.tls={{ matrix_conduit_container_labels_public_client_root_traefik_tls | to_json }}
{% if matrix_conduit_container_labels_public_client_root_traefik_tls %}
traefik.http.routers.matrix-conduit-client-root.tls.certResolver={{ matrix_conduit_container_labels_public_client_root_traefik_tls_certResolver }}
{% endif %}
{% endif %}
{#
/Public Root path (/)
#}
{#
Public Client-API (/_matrix)
#}
{% if matrix_conduit_container_labels_public_client_api_enabled %}
traefik.http.routers.matrix-conduit-client-api.rule={{ matrix_conduit_container_labels_public_client_api_traefik_rule }}
{% if matrix_conduit_container_labels_public_client_api_traefik_priority | int > 0 %}
traefik.http.routers.matrix-conduit-client-api.priority={{ matrix_conduit_container_labels_public_client_api_traefik_priority }}
{% endif %}
traefik.http.routers.matrix-conduit-client-api.service=matrix-conduit
traefik.http.routers.matrix-conduit-client-api.entrypoints={{ matrix_conduit_container_labels_public_client_api_traefik_entrypoints }}
traefik.http.routers.matrix-conduit-client-api.tls={{ matrix_conduit_container_labels_public_client_api_traefik_tls | to_json }}
{% if matrix_conduit_container_labels_public_client_api_traefik_tls %}
traefik.http.routers.matrix-conduit-client-api.tls.certResolver={{ matrix_conduit_container_labels_public_client_api_traefik_tls_certResolver }}
{% endif %}
{% endif %}
{#
/Public Client-API (/_matrix)
#}
{#
Public Federation-API (/_matrix)
#}
{% if matrix_conduit_container_labels_public_federation_api_enabled %}
traefik.http.routers.matrix-conduit-federation-api.rule={{ matrix_conduit_container_labels_public_federation_api_traefik_rule }}
{% if matrix_conduit_container_labels_public_federation_api_traefik_priority | int > 0 %}
traefik.http.routers.matrix-conduit-federation-api.priority={{ matrix_conduit_container_labels_public_federation_api_traefik_priority }}
{% endif %}
traefik.http.routers.matrix-conduit-federation-api.service=matrix-conduit
traefik.http.routers.matrix-conduit-federation-api.entrypoints={{ matrix_conduit_container_labels_public_federation_api_traefik_entrypoints }}
traefik.http.routers.matrix-conduit-federation-api.tls={{ matrix_conduit_container_labels_public_federation_api_traefik_tls | to_json }}
{% if matrix_conduit_container_labels_public_federation_api_traefik_tls %}
traefik.http.routers.matrix-conduit-federation-api.tls.certResolver={{ matrix_conduit_container_labels_public_federation_api_traefik_tls_certResolver }}
{% endif %}
{% endif %}
{#
/Public Federation-API (/_matrix)
#}
{% endif %}
{{ matrix_conduit_container_labels_additional_labels }}