2024-01-03 12:05:59 +01:00
|
|
|
{% if matrix_static_files_container_labels_traefik_enabled %}
|
|
|
|
traefik.enable=true
|
|
|
|
|
|
|
|
{% if matrix_static_files_container_labels_traefik_docker_network %}
|
|
|
|
traefik.docker.network={{ matrix_static_files_container_labels_traefik_docker_network }}
|
|
|
|
{% endif %}
|
|
|
|
|
2024-01-09 08:54:00 +01:00
|
|
|
traefik.http.services.{{ matrix_static_files_identifier }}.loadbalancer.server.port={{ matrix_static_files_environment_variable_server_port }}
|
2024-01-03 12:05:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
{% if matrix_static_files_container_labels_well_known_matrix_endpoint_enabled %}
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# Related to /.well-known/matrix on the matrix domain #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-03 12:05:59 +01:00
|
|
|
|
2024-01-03 15:18:39 +01:00
|
|
|
{% set well_known_matrix_endpoint_middlewares = [] %}
|
|
|
|
|
|
|
|
{% if matrix_static_files_container_labels_well_known_matrix_endpoint_middleware_compress_enabled %}
|
2024-01-11 11:33:05 +01:00
|
|
|
traefik.http.middlewares.{{ matrix_static_files_identifier }}-well-known-compress.compress=true
|
|
|
|
traefik.http.middlewares.{{ matrix_static_files_identifier }}-well-known-compress.compress.minResponseBodyBytes={{ matrix_static_files_container_labels_well_known_matrix_endpoint_middleware_compress_minResponseBodyBytes }}
|
|
|
|
{% set well_known_matrix_endpoint_middlewares = well_known_matrix_endpoint_middlewares + [matrix_static_files_identifier + '-well-known-compress'] %}
|
2024-01-03 15:18:39 +01:00
|
|
|
{% endif %}
|
2024-01-03 12:05:59 +01:00
|
|
|
|
2024-01-11 11:33:05 +01:00
|
|
|
traefik.http.routers.{{ matrix_static_files_identifier }}-well-known.rule={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_rule }}
|
2024-01-03 15:18:39 +01:00
|
|
|
|
|
|
|
{% if well_known_matrix_endpoint_middlewares | length > 0 %}
|
2024-01-11 11:33:05 +01:00
|
|
|
traefik.http.routers.{{ matrix_static_files_identifier }}-well-known.middlewares={{ well_known_matrix_endpoint_middlewares | join(',') }}
|
2024-01-03 15:18:39 +01:00
|
|
|
{% endif %}
|
2024-01-03 12:05:59 +01:00
|
|
|
|
|
|
|
{% if matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_priority | int > 0 %}
|
2024-01-11 11:33:05 +01:00
|
|
|
traefik.http.routers.{{ matrix_static_files_identifier }}-well-known.priority={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_priority }}
|
2024-01-03 12:05:59 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-11 11:33:05 +01:00
|
|
|
traefik.http.routers.{{ matrix_static_files_identifier }}-well-known.service={{ matrix_static_files_identifier }}
|
|
|
|
traefik.http.routers.{{ matrix_static_files_identifier }}-well-known.entrypoints={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_entrypoints }}
|
|
|
|
traefik.http.routers.{{ matrix_static_files_identifier }}-well-known.tls={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_tls | to_json }}
|
2024-01-03 12:05:59 +01:00
|
|
|
|
|
|
|
{% if matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_tls %}
|
2024-01-11 11:33:05 +01:00
|
|
|
traefik.http.routers.{{ matrix_static_files_identifier }}-well-known.tls.certResolver={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_tls_certResolver }}
|
2024-01-03 12:05:59 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# /Related to /.well-known/matrix on the matrix domain #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-03 12:05:59 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
2024-01-03 13:39:17 +01:00
|
|
|
{% if matrix_static_files_container_labels_base_domain_enabled %}
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# Base domain serving #
|
|
|
|
# #
|
|
|
|
############################################################
|
|
|
|
|
2024-01-31 11:13:20 +01:00
|
|
|
{% set middlewares = [] %}
|
|
|
|
|
|
|
|
{% if matrix_static_files_container_labels_base_domain_root_path_redirection_enabled %}
|
2024-02-11 08:07:32 +01:00
|
|
|
traefik.http.middlewares.{{ matrix_static_files_identifier }}-base-domain-root-path-redirect.redirectregex.regex={{ matrix_static_files_container_labels_base_domain_root_path_redirection_regex }}
|
|
|
|
traefik.http.middlewares.{{ matrix_static_files_identifier }}-base-domain-root-path-redirect.redirectregex.replacement={{ matrix_static_files_container_labels_base_domain_root_path_redirection_url }}
|
|
|
|
{% set middlewares = middlewares + [matrix_static_files_identifier + '-base-domain-root-path-redirect'] %}
|
2024-01-31 11:13:20 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-09 08:54:00 +01:00
|
|
|
traefik.http.routers.{{ matrix_static_files_identifier }}-base-domain.rule={{ matrix_static_files_container_labels_base_domain_traefik_rule }}
|
2024-01-03 13:39:17 +01:00
|
|
|
|
|
|
|
{% if matrix_static_files_container_labels_base_domain_traefik_priority | int > 0 %}
|
2024-01-09 08:54:00 +01:00
|
|
|
traefik.http.routers.{{ matrix_static_files_identifier }}-base-domain.priority={{ matrix_static_files_container_labels_base_domain_traefik_priority }}
|
2024-01-03 13:39:17 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-31 11:13:20 +01:00
|
|
|
{% if middlewares | length > 0 %}
|
|
|
|
traefik.http.routers.{{ matrix_static_files_identifier }}-base-domain.middlewares={{ middlewares | join(',') }}
|
|
|
|
{% endif %}
|
|
|
|
|
2024-01-09 08:54:00 +01:00
|
|
|
traefik.http.routers.{{ matrix_static_files_identifier }}-base-domain.service={{ matrix_static_files_identifier }}
|
|
|
|
traefik.http.routers.{{ matrix_static_files_identifier }}-base-domain.entrypoints={{ matrix_static_files_container_labels_base_domain_traefik_entrypoints }}
|
|
|
|
traefik.http.routers.{{ matrix_static_files_identifier }}-base-domain.tls={{ matrix_static_files_container_labels_base_domain_traefik_tls | to_json }}
|
2024-01-03 13:39:17 +01:00
|
|
|
|
|
|
|
{% if matrix_static_files_container_labels_base_domain_traefik_tls %}
|
2024-01-09 08:54:00 +01:00
|
|
|
traefik.http.routers.{{ matrix_static_files_identifier }}-base-domain.tls.certResolver={{ matrix_static_files_container_labels_base_domain_traefik_tls_certResolver }}
|
2024-01-03 13:39:17 +01:00
|
|
|
{% endif %}
|
|
|
|
|
2024-01-15 09:41:15 +01:00
|
|
|
############################################################
|
|
|
|
# #
|
|
|
|
# /Base domain serving #
|
|
|
|
# #
|
|
|
|
############################################################
|
2024-01-03 13:39:17 +01:00
|
|
|
{% endif %}
|
2024-01-15 09:41:15 +01:00
|
|
|
|
2024-01-03 13:39:17 +01:00
|
|
|
|
2024-01-03 12:05:59 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{{ matrix_static_files_container_labels_additional_labels }}
|