2024-01-09 15:27:13 +02:00
|
|
|
{% if matrix_ma1sd_container_labels_traefik_enabled %}
|
|
|
|
traefik.enable=true
|
|
|
|
|
|
|
|
{% if matrix_ma1sd_container_labels_traefik_docker_network %}
|
|
|
|
traefik.docker.network={{ matrix_ma1sd_container_labels_traefik_docker_network }}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
traefik.http.services.matrix-ma1sd.loadbalancer.server.port={{ matrix_ma1sd_container_port }}
|
|
|
|
|
|
|
|
{% if matrix_ma1sd_container_labels_matrix_identity_enabled %}
|
2024-01-15 10:41:15 +02:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# Matrix Identity APIs (/_matrix/identity) #
|
|
|
|
# #
|
|
|
|
############################################################
|
|
|
|
|
2024-01-09 15:27:13 +02:00
|
|
|
traefik.http.routers.matrix-ma1sd-matrix-identity.rule={{ matrix_ma1sd_container_labels_matrix_identity_traefik_rule }}
|
|
|
|
|
|
|
|
{% if matrix_ma1sd_container_labels_matrix_identity_traefik_priority | int > 0 %}
|
|
|
|
traefik.http.routers.matrix-ma1sd-matrix-identity.priority={{ matrix_ma1sd_container_labels_matrix_identity_traefik_priority }}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
traefik.http.routers.matrix-ma1sd-matrix-identity.service=matrix-ma1sd
|
|
|
|
traefik.http.routers.matrix-ma1sd-matrix-identity.entrypoints={{ matrix_ma1sd_container_labels_matrix_identity_traefik_entrypoints }}
|
|
|
|
|
|
|
|
traefik.http.routers.matrix-ma1sd-matrix-identity.tls={{ matrix_ma1sd_container_labels_matrix_identity_traefik_tls | to_json }}
|
|
|
|
{% if matrix_ma1sd_container_labels_matrix_identity_traefik_tls %}
|
|
|
|
traefik.http.routers.matrix-ma1sd-matrix-identity.tls.certResolver={{ matrix_ma1sd_container_labels_matrix_identity_traefik_tls_certResolver }}
|
|
|
|
{% endif %}
|
2024-01-15 10:41:15 +02:00
|
|
|
|
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# /Matrix Identity APIs (/_matrix/identity) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-09 15:27:13 +02:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
{% if matrix_ma1sd_container_labels_matrix_client_user_directory_search_enabled %}
|
2024-01-15 10:41:15 +02:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# Matrix Client user-directory search API endpoint #
|
|
|
|
# (/_matrix/client/VERSION/user_directory/search) #
|
|
|
|
# #
|
|
|
|
############################################################
|
|
|
|
|
|
|
|
# ma1sd only supports /_matrix/client/r0/user_directory/search
|
|
|
|
# while we potentially handle /_matrix/client/v3/user_directory/search as well,
|
|
|
|
# so we need to transparently reroute.
|
2024-01-09 15:27:13 +02:00
|
|
|
traefik.http.middlewares.matrix-ma1sd-matrix-client-user-directory-search-replacepath.replacepath.path=/_matrix/client/r0/user_directory/search
|
|
|
|
|
|
|
|
traefik.http.routers.matrix-ma1sd-matrix-client-user-directory-search.rule={{ matrix_ma1sd_container_labels_matrix_client_user_directory_search_traefik_rule }}
|
|
|
|
|
|
|
|
traefik.http.routers.matrix-ma1sd-matrix-client-user-directory-search.middlewares=matrix-ma1sd-matrix-client-user-directory-search-replacepath
|
|
|
|
|
|
|
|
{% if matrix_ma1sd_container_labels_matrix_client_user_directory_search_traefik_priority | int > 0 %}
|
|
|
|
traefik.http.routers.matrix-ma1sd-matrix-client-user-directory-search.priority={{ matrix_ma1sd_container_labels_matrix_client_user_directory_search_traefik_priority }}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
traefik.http.routers.matrix-ma1sd-matrix-client-user-directory-search.service=matrix-ma1sd
|
|
|
|
traefik.http.routers.matrix-ma1sd-matrix-client-user-directory-search.entrypoints={{ matrix_ma1sd_container_labels_matrix_client_user_directory_search_traefik_entrypoints }}
|
|
|
|
|
|
|
|
traefik.http.routers.matrix-ma1sd-matrix-client-user-directory-search.tls={{ matrix_ma1sd_container_labels_matrix_client_user_directory_search_traefik_tls | to_json }}
|
|
|
|
{% if matrix_ma1sd_container_labels_matrix_client_user_directory_search_traefik_tls %}
|
|
|
|
traefik.http.routers.matrix-ma1sd-matrix-client-user-directory-search.tls.certResolver={{ matrix_ma1sd_container_labels_matrix_client_user_directory_search_traefik_tls_certResolver }}
|
|
|
|
{% endif %}
|
2024-01-15 10:41:15 +02:00
|
|
|
|
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# /Matrix Client user-directory search API endpoint #
|
|
|
|
# (/_matrix/client/VERSION/user_directory/search) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-09 15:27:13 +02:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
{% if matrix_ma1sd_container_labels_matrix_client_user_directory_search_enabled %}
|
2024-01-15 10:41:15 +02:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# Matrix Client 3pid registration API endpoint #
|
|
|
|
# (/_matrix/client/VERSION/register/TYPE/requestToken) #
|
|
|
|
# #
|
|
|
|
############################################################
|
|
|
|
|
|
|
|
# ma1sd only supports /_matrix/client/r0/register/TYPE/requestToken
|
|
|
|
# while we potentially handle /_matrix/client/v3/register/TYPE/requestToken as well,
|
|
|
|
# so we need to transparently reroute.
|
2024-01-09 15:27:13 +02:00
|
|
|
traefik.http.middlewares.matrix-ma1sd-matrix-client-3pid-registration-replacepathregex.replacepathregex.regex=^/_matrix/client/([^/]+)/register/([^/]+)/requestToken
|
|
|
|
traefik.http.middlewares.matrix-ma1sd-matrix-client-3pid-registration-replacepathregex.replacepathregex.replacement=/_matrix/client/r0/register/${2}/requestToken
|
|
|
|
|
|
|
|
traefik.http.routers.matrix-ma1sd-matrix-client-3pid-registration.rule={{ matrix_ma1sd_container_labels_matrix_client_3pid_registration_traefik_rule }}
|
|
|
|
|
|
|
|
traefik.http.routers.matrix-ma1sd-matrix-client-3pid-registration.middlewares=matrix-ma1sd-matrix-client-3pid-registration-replacepathregex
|
|
|
|
|
|
|
|
{% if matrix_ma1sd_container_labels_matrix_client_3pid_registration_traefik_priority | int > 0 %}
|
|
|
|
traefik.http.routers.matrix-ma1sd-matrix-client-3pid-registration.priority={{ matrix_ma1sd_container_labels_matrix_client_3pid_registration_traefik_priority }}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
traefik.http.routers.matrix-ma1sd-matrix-client-3pid-registration.service=matrix-ma1sd
|
|
|
|
traefik.http.routers.matrix-ma1sd-matrix-client-3pid-registration.entrypoints={{ matrix_ma1sd_container_labels_matrix_client_3pid_registration_traefik_entrypoints }}
|
|
|
|
|
|
|
|
traefik.http.routers.matrix-ma1sd-matrix-client-3pid-registration.tls={{ matrix_ma1sd_container_labels_matrix_client_3pid_registration_traefik_tls | to_json }}
|
|
|
|
{% if matrix_ma1sd_container_labels_matrix_client_3pid_registration_traefik_tls %}
|
|
|
|
traefik.http.routers.matrix-ma1sd-matrix-client-3pid-registration.tls.certResolver={{ matrix_ma1sd_container_labels_matrix_client_3pid_registration_traefik_tls_certResolver }}
|
|
|
|
{% endif %}
|
2024-01-15 10:41:15 +02:00
|
|
|
|
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# /Matrix Client 3pid registration API endpoint #
|
|
|
|
# (/_matrix/client/VERSION/register/TYPE/requestToken) #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-09 15:27:13 +02:00
|
|
|
{% endif %}
|
2024-01-15 10:41:15 +02:00
|
|
|
|
2024-01-09 15:27:13 +02:00
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{{ matrix_ma1sd_container_labels_additional_labels }}
|