2024-01-04 18:00:23 +01:00
|
|
|
{% if matrix_synapse_container_labels_traefik_enabled %}
|
|
|
|
traefik.enable=true
|
|
|
|
|
|
|
|
{% if matrix_synapse_container_labels_traefik_docker_network %}
|
|
|
|
traefik.docker.network={{ matrix_synapse_container_labels_traefik_docker_network }}
|
|
|
|
{% endif %}
|
|
|
|
|
2024-01-12 08:31:31 +01:00
|
|
|
traefik.http.services.matrix-synapse-client-api.loadbalancer.server.port={{ matrix_synapse_container_client_api_port }}
|
|
|
|
traefik.http.services.matrix-synapse-federation-api.loadbalancer.server.port={{ matrix_synapse_container_federation_api_plain_port }}
|
2024-01-12 08:52:08 +01:00
|
|
|
traefik.http.services.matrix-synapse-metrics.loadbalancer.server.port={{ matrix_synapse_metrics_port }}
|
2024-01-04 18:00:23 +01:00
|
|
|
|
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
{% if matrix_synapse_container_labels_public_client_root_enabled %}
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# Public Root path (/) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-04 18:00:23 +01:00
|
|
|
|
|
|
|
{% set client_root_middlewares = [] %}
|
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
{% if matrix_synapse_container_labels_public_client_root_redirection_enabled %}
|
|
|
|
{% set client_root_middlewares = client_root_middlewares + ['matrix-synapse-public-client-root-redirect'] %}
|
|
|
|
traefik.http.middlewares.matrix-synapse-public-client-root-redirect.redirectregex.regex=(.*)
|
|
|
|
traefik.http.middlewares.matrix-synapse-public-client-root-redirect.redirectregex.replacement={{ matrix_synapse_container_labels_public_client_root_redirection_url }}
|
2024-01-04 18:00:23 +01:00
|
|
|
{% else %}
|
2024-01-14 09:23:55 +01:00
|
|
|
{% set client_root_middlewares = client_root_middlewares + ['matrix-synapse-public-client-root-replacepath'] %}
|
|
|
|
traefik.http.middlewares.matrix-synapse-public-client-root-replacepath.replacepath.path=/_matrix/static/
|
2024-01-04 18:00:23 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
traefik.http.routers.matrix-synapse-public-client-root.rule={{ matrix_synapse_container_labels_public_client_root_traefik_rule }}
|
2024-01-04 18:00:23 +01:00
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
traefik.http.routers.matrix-synapse-public-client-root.middlewares={{ client_root_middlewares | join(',') }}
|
2024-01-04 18:00:23 +01:00
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
{% if matrix_synapse_container_labels_public_client_root_traefik_priority | int > 0 %}
|
|
|
|
traefik.http.routers.matrix-synapse-public-client-root.priority={{ matrix_synapse_container_labels_public_client_root_traefik_priority }}
|
2024-01-04 18:00:23 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
traefik.http.routers.matrix-synapse-public-client-root.service=matrix-synapse-client-api
|
|
|
|
traefik.http.routers.matrix-synapse-public-client-root.entrypoints={{ matrix_synapse_container_labels_public_client_root_traefik_entrypoints }}
|
|
|
|
traefik.http.routers.matrix-synapse-public-client-root.tls={{ matrix_synapse_container_labels_public_client_root_traefik_tls | to_json }}
|
2024-01-04 18:00:23 +01:00
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
{% if matrix_synapse_container_labels_public_client_root_traefik_tls %}
|
|
|
|
traefik.http.routers.matrix-synapse-public-client-root.tls.certResolver={{ matrix_synapse_container_labels_public_client_root_traefik_tls_certResolver }}
|
2024-01-04 18:00:23 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# /Public Root path (/) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-04 18:00:23 +01:00
|
|
|
{% endif %}
|
2024-01-15 09:41:15 +01:00
|
|
|
|
|
|
|
|
2024-01-17 09:13:15 +01:00
|
|
|
{% if matrix_synapse_container_labels_matrix_related_labels_enabled %}
|
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# MATRIX-RELATED (/_matrix, /_synapse/..) #
|
|
|
|
# #
|
|
|
|
############################################################
|
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
{% if matrix_synapse_container_labels_public_client_api_enabled %}
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# Public Client-API (/_matrix) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-04 18:00:23 +01:00
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
traefik.http.routers.matrix-synapse-public-client-api.rule={{ matrix_synapse_container_labels_public_client_api_traefik_rule }}
|
2024-01-04 18:00:23 +01:00
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
{% if matrix_synapse_container_labels_public_client_api_traefik_priority | int > 0 %}
|
|
|
|
traefik.http.routers.matrix-synapse-public-client-api.priority={{ matrix_synapse_container_labels_public_client_api_traefik_priority }}
|
2024-01-04 18:00:23 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
traefik.http.routers.matrix-synapse-public-client-api.service=matrix-synapse-client-api
|
|
|
|
traefik.http.routers.matrix-synapse-public-client-api.entrypoints={{ matrix_synapse_container_labels_public_client_api_traefik_entrypoints }}
|
|
|
|
traefik.http.routers.matrix-synapse-public-client-api.tls={{ matrix_synapse_container_labels_public_client_api_traefik_tls | to_json }}
|
2024-01-04 18:00:23 +01:00
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
{% if matrix_synapse_container_labels_public_client_api_traefik_tls %}
|
|
|
|
traefik.http.routers.matrix-synapse-public-client-api.tls.certResolver={{ matrix_synapse_container_labels_public_client_api_traefik_tls_certResolver }}
|
2024-01-04 18:00:23 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# /Public Client-API (/_matrix) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-04 18:00:23 +01:00
|
|
|
{% endif %}
|
2024-01-14 09:23:55 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% if matrix_synapse_container_labels_internal_client_api_enabled %}
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# Internal Client-API (/_matrix) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-14 09:23:55 +01:00
|
|
|
|
|
|
|
traefik.http.routers.matrix-synapse-internal-client-api.rule={{ matrix_synapse_container_labels_internal_client_api_traefik_rule }}
|
|
|
|
|
|
|
|
{% if matrix_synapse_container_labels_internal_client_api_traefik_priority | int > 0 %}
|
|
|
|
traefik.http.routers.matrix-synapse-internal-client-api.priority={{ matrix_synapse_container_labels_internal_client_api_traefik_priority }}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
traefik.http.routers.matrix-synapse-internal-client-api.service=matrix-synapse-client-api
|
|
|
|
traefik.http.routers.matrix-synapse-internal-client-api.entrypoints={{ matrix_synapse_container_labels_internal_client_api_traefik_entrypoints }}
|
|
|
|
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# /Internal Client-API (/_matrix) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-14 09:23:55 +01:00
|
|
|
{% endif %}
|
2024-01-04 18:00:23 +01:00
|
|
|
|
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
{% if matrix_synapse_container_labels_public_client_synapse_client_api_enabled %}
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# Public Synapse Admin API (/_synapse/client) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-04 18:00:23 +01:00
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
traefik.http.routers.matrix-synapse-public-client-synapse-client-api.rule={{ matrix_synapse_container_labels_public_client_synapse_client_api_traefik_rule }}
|
2024-01-04 18:00:23 +01:00
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
{% if matrix_synapse_container_labels_public_client_synapse_client_api_traefik_priority | int > 0 %}
|
|
|
|
traefik.http.routers.matrix-synapse-public-client-synapse-client-api.priority={{ matrix_synapse_container_labels_public_client_synapse_client_api_traefik_priority }}
|
2024-01-04 18:00:23 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
traefik.http.routers.matrix-synapse-public-client-synapse-client-api.service=matrix-synapse-client-api
|
|
|
|
traefik.http.routers.matrix-synapse-public-client-synapse-client-api.entrypoints={{ matrix_synapse_container_labels_public_client_synapse_client_api_traefik_entrypoints }}
|
|
|
|
traefik.http.routers.matrix-synapse-public-client-synapse-client-api.tls={{ matrix_synapse_container_labels_public_client_synapse_client_api_traefik_tls | to_json }}
|
2024-01-04 18:00:23 +01:00
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
{% if matrix_synapse_container_labels_public_client_synapse_client_api_traefik_tls %}
|
|
|
|
traefik.http.routers.matrix-synapse-public-client-synapse-client-api.tls.certResolver={{ matrix_synapse_container_labels_public_client_synapse_client_api_traefik_tls_certResolver }}
|
2024-01-04 18:00:23 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# /Public Synapse Admin API (/_synapse/client) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-04 18:00:23 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
{% if matrix_synapse_container_labels_public_client_synapse_admin_api_enabled %}
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# Public Synapse Admin API (/_synapse/admin) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-04 18:00:23 +01:00
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
traefik.http.routers.matrix-synapse-public-client-synapse-admin-api.rule={{ matrix_synapse_container_labels_public_client_synapse_admin_api_traefik_rule }}
|
2024-01-04 18:00:23 +01:00
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
{% if matrix_synapse_container_labels_public_client_synapse_admin_api_traefik_priority | int > 0 %}
|
|
|
|
traefik.http.routers.matrix-synapse-public-client-synapse-admin-api.priority={{ matrix_synapse_container_labels_public_client_synapse_admin_api_traefik_priority }}
|
2024-01-04 18:00:23 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
traefik.http.routers.matrix-synapse-public-client-synapse-admin-api.service=matrix-synapse-client-api
|
|
|
|
traefik.http.routers.matrix-synapse-public-client-synapse-admin-api.entrypoints={{ matrix_synapse_container_labels_public_client_synapse_admin_api_traefik_entrypoints }}
|
|
|
|
traefik.http.routers.matrix-synapse-public-client-synapse-admin-api.tls={{ matrix_synapse_container_labels_public_client_synapse_admin_api_traefik_tls | to_json }}
|
2024-01-04 18:00:23 +01:00
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
{% if matrix_synapse_container_labels_public_client_synapse_admin_api_traefik_tls %}
|
|
|
|
traefik.http.routers.matrix-synapse-public-client-synapse-admin-api.tls.certResolver={{ matrix_synapse_container_labels_public_client_synapse_admin_api_traefik_tls_certResolver }}
|
2024-01-04 18:00:23 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# /Public Synapse Admin API (/_synapse/admin) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-04 18:00:23 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
{% if matrix_synapse_container_labels_public_federation_api_enabled %}
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# Public Federation-API (/_matrix) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-04 18:00:23 +01:00
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
traefik.http.routers.matrix-synapse-public-federation-api.rule={{ matrix_synapse_container_labels_public_federation_api_traefik_rule }}
|
2024-01-04 18:00:23 +01:00
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
{% if matrix_synapse_container_labels_public_federation_api_traefik_priority | int > 0 %}
|
|
|
|
traefik.http.routers.matrix-synapse-public-federation-api.priority={{ matrix_synapse_container_labels_public_federation_api_traefik_priority }}
|
2024-01-04 18:00:23 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
traefik.http.routers.matrix-synapse-public-federation-api.service=matrix-synapse-federation-api
|
|
|
|
traefik.http.routers.matrix-synapse-public-federation-api.entrypoints={{ matrix_synapse_container_labels_public_federation_api_traefik_entrypoints }}
|
|
|
|
traefik.http.routers.matrix-synapse-public-federation-api.tls={{ matrix_synapse_container_labels_public_federation_api_traefik_tls | to_json }}
|
2024-01-04 18:00:23 +01:00
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
{% if matrix_synapse_container_labels_public_federation_api_traefik_tls %}
|
|
|
|
traefik.http.routers.matrix-synapse-public-federation-api.tls.certResolver={{ matrix_synapse_container_labels_public_federation_api_traefik_tls_certResolver }}
|
2024-01-04 18:00:23 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# /Public Federation-API (/_matrix) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-12 11:15:40 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-17 09:13:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# /MATRIX-RELATED (/_matrix, /_synapse/..) #
|
|
|
|
# #
|
|
|
|
############################################################
|
|
|
|
{% endif %} {# end of matrix_synapse_container_labels_matrix_related_labels_enabled if-check #}
|
|
|
|
|
2024-01-12 11:15:40 +01:00
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
{% if matrix_synapse_container_labels_public_metrics_enabled %}
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# Public Metrics (e.g. /metrics/synapse/main-process) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-12 08:52:08 +01:00
|
|
|
|
|
|
|
{% set metrics_middlewares = [] %}
|
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
{% if matrix_synapse_container_labels_public_metrics_middleware_basic_auth_enabled %}
|
2024-01-12 08:52:08 +01:00
|
|
|
{% set metrics_middlewares = metrics_middlewares + ['matrix-synapse-metrics-basic-auth'] %}
|
2024-01-14 09:23:55 +01:00
|
|
|
traefik.http.middlewares.matrix-synapse-metrics-basic-auth.basicauth.users={{ matrix_synapse_container_labels_public_metrics_middleware_basic_auth_users }}
|
2024-01-12 08:52:08 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% set metrics_middlewares = metrics_middlewares + ['matrix-synapse-metrics-replacepath'] %}
|
|
|
|
traefik.http.middlewares.matrix-synapse-metrics-replacepath.replacepath.path=/_synapse/metrics
|
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
traefik.http.routers.matrix-synapse-metrics.rule={{ matrix_synapse_container_labels_public_metrics_traefik_rule }}
|
2024-01-12 08:52:08 +01:00
|
|
|
|
|
|
|
{% if metrics_middlewares | length > 0 %}
|
|
|
|
traefik.http.routers.matrix-synapse-metrics.middlewares={{ metrics_middlewares | join(',') }}
|
|
|
|
{% endif %}
|
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
{% if matrix_synapse_container_labels_public_metrics_traefik_priority | int > 0 %}
|
|
|
|
traefik.http.routers.matrix-synapse-metrics.priority={{ matrix_synapse_container_labels_public_metrics_traefik_priority }}
|
2024-01-12 08:52:08 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
traefik.http.routers.matrix-synapse-metrics.service=matrix-synapse-metrics
|
2024-01-14 09:23:55 +01:00
|
|
|
traefik.http.routers.matrix-synapse-metrics.entrypoints={{ matrix_synapse_container_labels_public_metrics_traefik_entrypoints }}
|
2024-01-12 08:52:08 +01:00
|
|
|
|
2024-01-14 09:23:55 +01:00
|
|
|
traefik.http.routers.matrix-synapse-metrics.tls={{ matrix_synapse_container_labels_public_metrics_traefik_tls | to_json }}
|
|
|
|
{% if matrix_synapse_container_labels_public_metrics_traefik_tls %}
|
|
|
|
traefik.http.routers.matrix-synapse-metrics.tls.certResolver={{ matrix_synapse_container_labels_public_metrics_traefik_tls_certResolver }}
|
2024-01-12 08:52:08 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# /Public Metrics (e.g. /metrics/synapse/main-process) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-12 08:52:08 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
2024-01-04 18:00:23 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{{ matrix_synapse_container_labels_additional_labels }}
|