2024-01-11 10:30:42 +01:00
|
|
|
{% if matrix_dendrite_container_labels_traefik_enabled %}
|
|
|
|
traefik.enable=true
|
|
|
|
|
|
|
|
{% if matrix_dendrite_container_labels_traefik_docker_network %}
|
|
|
|
traefik.docker.network={{ matrix_dendrite_container_labels_traefik_docker_network }}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
traefik.http.services.matrix-dendrite.loadbalancer.server.port={{ matrix_dendrite_http_bind_port }}
|
|
|
|
|
|
|
|
|
2024-01-14 09:29:38 +01:00
|
|
|
{% if matrix_dendrite_container_labels_public_client_root_enabled %}
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# Public Root path (/) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-11 10:30:42 +01:00
|
|
|
|
|
|
|
{% set client_root_middlewares = [] %}
|
|
|
|
|
2024-01-14 09:29:38 +01:00
|
|
|
{% if matrix_dendrite_container_labels_public_client_root_redirection_enabled %}
|
2024-01-11 10:30:42 +01:00
|
|
|
{% set client_root_middlewares = client_root_middlewares + ['matrix-dendrite-client-root-redirect'] %}
|
|
|
|
traefik.http.middlewares.matrix-dendrite-client-root-redirect.redirectregex.regex=(.*)
|
2024-01-14 09:29:38 +01:00
|
|
|
traefik.http.middlewares.matrix-dendrite-client-root-redirect.redirectregex.replacement={{ matrix_dendrite_container_labels_public_client_root_redirection_url }}
|
2024-01-11 10:30:42 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-14 09:37:21 +01:00
|
|
|
traefik.http.routers.matrix-dendrite-public-client-root.rule={{ matrix_dendrite_container_labels_public_client_root_traefik_rule }}
|
2024-01-11 10:30:42 +01:00
|
|
|
|
2024-01-14 09:37:21 +01:00
|
|
|
traefik.http.routers.matrix-dendrite-public-client-root.middlewares={{ client_root_middlewares | join(',') }}
|
2024-01-11 10:30:42 +01:00
|
|
|
|
2024-01-14 09:29:38 +01:00
|
|
|
{% if matrix_dendrite_container_labels_public_client_root_traefik_priority | int > 0 %}
|
2024-01-14 09:37:21 +01:00
|
|
|
traefik.http.routers.matrix-dendrite-public-client-root.priority={{ matrix_dendrite_container_labels_public_client_root_traefik_priority }}
|
2024-01-11 10:30:42 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-14 09:37:21 +01:00
|
|
|
traefik.http.routers.matrix-dendrite-public-client-root.service=matrix-dendrite
|
|
|
|
traefik.http.routers.matrix-dendrite-public-client-root.entrypoints={{ matrix_dendrite_container_labels_public_client_root_traefik_entrypoints }}
|
|
|
|
traefik.http.routers.matrix-dendrite-public-client-root.tls={{ matrix_dendrite_container_labels_public_client_root_traefik_tls | to_json }}
|
2024-01-11 10:30:42 +01:00
|
|
|
|
2024-01-14 09:29:38 +01:00
|
|
|
{% if matrix_dendrite_container_labels_public_client_root_traefik_tls %}
|
2024-01-14 09:37:21 +01:00
|
|
|
traefik.http.routers.matrix-dendrite-public-client-root.tls.certResolver={{ matrix_dendrite_container_labels_public_client_root_traefik_tls_certResolver }}
|
2024-01-11 10:30:42 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# /Public Root path (/) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-11 10:30:42 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
2024-01-14 09:29:38 +01:00
|
|
|
{% if matrix_dendrite_container_labels_public_client_api_enabled %}
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# Public Client-API (/_matrix) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-11 10:30:42 +01:00
|
|
|
|
2024-01-14 09:37:21 +01:00
|
|
|
traefik.http.routers.matrix-dendrite-public-client-api.rule={{ matrix_dendrite_container_labels_public_client_api_traefik_rule }}
|
2024-01-11 10:30:42 +01:00
|
|
|
|
2024-01-14 09:29:38 +01:00
|
|
|
{% if matrix_dendrite_container_labels_public_client_api_traefik_priority | int > 0 %}
|
2024-01-14 09:37:21 +01:00
|
|
|
traefik.http.routers.matrix-dendrite-public-client-api.priority={{ matrix_dendrite_container_labels_public_client_api_traefik_priority }}
|
2024-01-11 10:30:42 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-14 09:37:21 +01:00
|
|
|
traefik.http.routers.matrix-dendrite-public-client-api.service=matrix-dendrite
|
|
|
|
traefik.http.routers.matrix-dendrite-public-client-api.entrypoints={{ matrix_dendrite_container_labels_public_client_api_traefik_entrypoints }}
|
|
|
|
traefik.http.routers.matrix-dendrite-public-client-api.tls={{ matrix_dendrite_container_labels_public_client_api_traefik_tls | to_json }}
|
2024-01-11 10:30:42 +01:00
|
|
|
|
2024-01-14 09:29:38 +01:00
|
|
|
{% if matrix_dendrite_container_labels_public_client_api_traefik_tls %}
|
2024-01-14 09:37:21 +01:00
|
|
|
traefik.http.routers.matrix-dendrite-public-client-api.tls.certResolver={{ matrix_dendrite_container_labels_public_client_api_traefik_tls_certResolver }}
|
2024-01-11 10:30:42 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# /Public Client-API (/_matrix) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-11 10:30:42 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
2024-01-14 09:37:21 +01:00
|
|
|
{% if matrix_dendrite_container_labels_internal_client_api_enabled %}
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# Internal Client-API (/_matrix) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-14 09:37:21 +01:00
|
|
|
|
|
|
|
traefik.http.routers.matrix-dendrite-internal-client-api.rule={{ matrix_dendrite_container_labels_internal_client_api_traefik_rule }}
|
|
|
|
|
|
|
|
{% if matrix_dendrite_container_labels_internal_client_api_traefik_priority | int > 0 %}
|
|
|
|
traefik.http.routers.matrix-dendrite-internal-client-api.priority={{ matrix_dendrite_container_labels_internal_client_api_traefik_priority }}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
traefik.http.routers.matrix-dendrite-internal-client-api.service=matrix-dendrite
|
|
|
|
traefik.http.routers.matrix-dendrite-internal-client-api.entrypoints={{ matrix_dendrite_container_labels_internal_client_api_traefik_entrypoints }}
|
|
|
|
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# /Internal Client-API (/_matrix) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-14 09:37:21 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
2024-01-14 09:29:38 +01:00
|
|
|
{% if matrix_dendrite_container_labels_public_client_synapse_admin_api_enabled %}
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# Public Synapse Admin API (/_synapse/admin) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-11 10:30:42 +01:00
|
|
|
|
2024-01-14 09:37:21 +01:00
|
|
|
traefik.http.routers.matrix-dendrite-public-client-synapse-admin-api.rule={{ matrix_dendrite_container_labels_public_client_synapse_admin_api_traefik_rule }}
|
2024-01-11 10:30:42 +01:00
|
|
|
|
2024-01-14 09:29:38 +01:00
|
|
|
{% if matrix_dendrite_container_labels_public_client_synapse_admin_api_traefik_priority | int > 0 %}
|
2024-01-14 09:37:21 +01:00
|
|
|
traefik.http.routers.matrix-dendrite-public-client-synapse-admin-api.priority={{ matrix_dendrite_container_labels_public_client_synapse_admin_api_traefik_priority }}
|
2024-01-11 10:30:42 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-14 09:37:21 +01:00
|
|
|
traefik.http.routers.matrix-dendrite-public-client-synapse-admin-api.service=matrix-dendrite
|
|
|
|
traefik.http.routers.matrix-dendrite-public-client-synapse-admin-api.entrypoints={{ matrix_dendrite_container_labels_public_client_synapse_admin_api_traefik_entrypoints }}
|
|
|
|
traefik.http.routers.matrix-dendrite-public-client-synapse-admin-api.tls={{ matrix_dendrite_container_labels_public_client_synapse_admin_api_traefik_tls | to_json }}
|
2024-01-11 10:30:42 +01:00
|
|
|
|
2024-01-14 09:29:38 +01:00
|
|
|
{% if matrix_dendrite_container_labels_public_client_synapse_admin_api_traefik_tls %}
|
2024-01-14 09:37:21 +01:00
|
|
|
traefik.http.routers.matrix-dendrite-public-client-synapse-admin-api.tls.certResolver={{ matrix_dendrite_container_labels_public_client_synapse_admin_api_traefik_tls_certResolver }}
|
2024-01-11 10:30:42 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# /Public Synapse Admin API (/_synapse/admin) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-11 10:30:42 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
2024-01-14 09:29:38 +01:00
|
|
|
{% if matrix_dendrite_container_labels_public_client_dendrite_admin_api_enabled %}
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# Public Dendrite Admin API (/_dendrite/admin) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-11 10:30:42 +01:00
|
|
|
|
2024-01-14 09:37:21 +01:00
|
|
|
traefik.http.routers.matrix-dendrite-public-client-synapse-admin-api.rule={{ matrix_dendrite_container_labels_public_client_dendrite_admin_api_traefik_rule }}
|
2024-01-11 10:30:42 +01:00
|
|
|
|
2024-01-14 09:29:38 +01:00
|
|
|
{% if matrix_dendrite_container_labels_public_client_dendrite_admin_api_traefik_priority | int > 0 %}
|
2024-01-14 09:37:21 +01:00
|
|
|
traefik.http.routers.matrix-dendrite-public-client-synapse-admin-api.priority={{ matrix_dendrite_container_labels_public_client_dendrite_admin_api_traefik_priority }}
|
2024-01-11 10:30:42 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-14 09:37:21 +01:00
|
|
|
traefik.http.routers.matrix-dendrite-public-client-synapse-admin-api.service=matrix-dendrite
|
|
|
|
traefik.http.routers.matrix-dendrite-public-client-synapse-admin-api.entrypoints={{ matrix_dendrite_container_labels_public_client_dendrite_admin_api_traefik_entrypoints }}
|
|
|
|
traefik.http.routers.matrix-dendrite-public-client-synapse-admin-api.tls={{ matrix_dendrite_container_labels_public_client_dendrite_admin_api_traefik_tls | to_json }}
|
2024-01-11 10:30:42 +01:00
|
|
|
|
2024-01-14 09:29:38 +01:00
|
|
|
{% if matrix_dendrite_container_labels_public_client_dendrite_admin_api_traefik_tls %}
|
2024-01-14 09:37:21 +01:00
|
|
|
traefik.http.routers.matrix-dendrite-public-client-synapse-admin-api.tls.certResolver={{ matrix_dendrite_container_labels_public_client_dendrite_admin_api_traefik_tls_certResolver }}
|
2024-01-11 10:30:42 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# /Public Dendrite Admin API (/_dendrite/admin) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-11 10:30:42 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
2024-01-14 09:29:38 +01:00
|
|
|
{% if matrix_dendrite_container_labels_public_federation_api_enabled %}
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# Public Federation-API (/_matrix) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-11 10:30:42 +01:00
|
|
|
|
2024-01-14 09:37:21 +01:00
|
|
|
traefik.http.routers.matrix-dendrite-public-federation-api.rule={{ matrix_dendrite_container_labels_public_federation_api_traefik_rule }}
|
2024-01-11 10:30:42 +01:00
|
|
|
|
2024-01-14 09:29:38 +01:00
|
|
|
{% if matrix_dendrite_container_labels_public_federation_api_traefik_priority | int > 0 %}
|
2024-01-14 09:37:21 +01:00
|
|
|
traefik.http.routers.matrix-dendrite-public-federation-api.priority={{ matrix_dendrite_container_labels_public_federation_api_traefik_priority }}
|
2024-01-11 10:30:42 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-14 09:37:21 +01:00
|
|
|
traefik.http.routers.matrix-dendrite-public-federation-api.service=matrix-dendrite
|
|
|
|
traefik.http.routers.matrix-dendrite-public-federation-api.entrypoints={{ matrix_dendrite_container_labels_public_federation_api_traefik_entrypoints }}
|
|
|
|
traefik.http.routers.matrix-dendrite-public-federation-api.tls={{ matrix_dendrite_container_labels_public_federation_api_traefik_tls | to_json }}
|
2024-01-11 10:30:42 +01:00
|
|
|
|
2024-01-14 09:29:38 +01:00
|
|
|
{% if matrix_dendrite_container_labels_public_federation_api_traefik_tls %}
|
2024-01-14 09:37:21 +01:00
|
|
|
traefik.http.routers.matrix-dendrite-public-federation-api.tls.certResolver={{ matrix_dendrite_container_labels_public_federation_api_traefik_tls_certResolver }}
|
2024-01-11 10:30:42 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# /Public Federation-API (/_matrix) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-11 10:30:42 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-11 11:02:15 +01:00
|
|
|
|
2024-01-14 09:29:38 +01:00
|
|
|
{% if matrix_dendrite_container_labels_public_metrics_enabled %}
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# Public Metrics #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-11 11:02:15 +01:00
|
|
|
|
|
|
|
{% set metrics_middlewares = [] %}
|
|
|
|
|
2024-01-14 09:29:38 +01:00
|
|
|
{% if matrix_dendrite_container_labels_public_metrics_middleware_basic_auth_enabled %}
|
2024-01-11 11:02:15 +01:00
|
|
|
{% set metrics_middlewares = metrics_middlewares + ['matrix-dendrite-metrics-basic-auth'] %}
|
2024-01-14 09:29:38 +01:00
|
|
|
traefik.http.middlewares.matrix-dendrite-metrics-basic-auth.basicauth.users={{ matrix_dendrite_container_labels_public_metrics_middleware_basic_auth_users }}
|
2024-01-11 11:02:15 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% set metrics_middlewares = metrics_middlewares + ['matrix-dendrite-metrics-replacepath'] %}
|
|
|
|
traefik.http.middlewares.matrix-dendrite-metrics-replacepath.replacepath.path=/metrics
|
|
|
|
|
2024-01-14 09:29:38 +01:00
|
|
|
traefik.http.routers.matrix-dendrite-metrics.rule={{ matrix_dendrite_container_labels_public_metrics_traefik_rule }}
|
2024-01-11 11:02:15 +01:00
|
|
|
|
|
|
|
{% if metrics_middlewares | length > 0 %}
|
|
|
|
traefik.http.routers.matrix-dendrite-metrics.middlewares={{ metrics_middlewares | join(',') }}
|
|
|
|
{% endif %}
|
|
|
|
|
2024-01-14 09:29:38 +01:00
|
|
|
{% if matrix_dendrite_container_labels_public_metrics_traefik_priority | int > 0 %}
|
|
|
|
traefik.http.routers.matrix-dendrite-metrics.priority={{ matrix_dendrite_container_labels_public_metrics_traefik_priority }}
|
2024-01-11 11:02:15 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
traefik.http.routers.matrix-dendrite-metrics.service=matrix-dendrite
|
2024-01-14 09:29:38 +01:00
|
|
|
traefik.http.routers.matrix-dendrite-metrics.entrypoints={{ matrix_dendrite_container_labels_public_metrics_traefik_entrypoints }}
|
2024-01-11 11:02:15 +01:00
|
|
|
|
2024-01-14 09:29:38 +01:00
|
|
|
traefik.http.routers.matrix-dendrite-metrics.tls={{ matrix_dendrite_container_labels_public_metrics_traefik_tls | to_json }}
|
|
|
|
{% if matrix_dendrite_container_labels_public_metrics_traefik_tls %}
|
|
|
|
traefik.http.routers.matrix-dendrite-metrics.tls.certResolver={{ matrix_dendrite_container_labels_public_metrics_traefik_tls_certResolver }}
|
2024-01-11 11:02:15 +01:00
|
|
|
{% endif %}
|
2024-01-15 09:41:15 +01:00
|
|
|
|
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# /Public Metrics #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-11 11:02:15 +01:00
|
|
|
{% endif %}
|
2024-01-15 09:41:15 +01:00
|
|
|
|
2024-01-11 11:02:15 +01:00
|
|
|
|
2024-01-11 10:30:42 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{{ matrix_dendrite_container_labels_additional_labels }}
|