47 lines
2.4 KiB
Plaintext
Raw Normal View History

{% if matrix_element_call_container_labels_traefik_enabled %}
traefik.enable=true
# Network configuration for Traefik
{% if matrix_jwt_service_container_labels_traefik_docker_network %}
traefik.docker.network={{ matrix_jwt_service_container_labels_traefik_docker_network }}
{% endif %}
2024-10-01 11:00:56 +10:00
traefik.http.services.matrix-jwt-service.loadbalancer.server.port=8881
{% set middlewares = [] %}
# Path prefix handling for JWT
{% if matrix_jwt_service_container_labels_traefik_path_prefix != '/' %}
traefik.http.middlewares.matrix-jwt-service-slashless-redirect.redirectregex.regex=({{ matrix_jwt_service_container_labels_traefik_path_prefix | quote }})$
traefik.http.middlewares.matrix-jwt-service-slashless-redirect.redirectregex.replacement=${1}/
{% set middlewares = middlewares + ['matrix-jwt-service-slashless-redirect'] %}
traefik.http.middlewares.matrix-jwt-service-strip-prefix.stripprefix.prefixes={{ matrix_jwt_service_container_labels_traefik_path_prefix }}
{% set middlewares = middlewares + ['matrix-jwt-service-strip-prefix'] %}
{% endif %}
{% if matrix_jwt_service_container_labels_traefik_additional_response_headers.keys() | length > 0 %}
{% for name, value in matrix_jwt_service_container_labels_traefik_additional_response_headers.items() %}
traefik.http.middlewares.matrix-jwt-service-add-headers.headers.customresponseheaders.{{ name }}={{ value }}
{% endfor %}
{% set middlewares = middlewares + ['matrix-jwt-service-add-headers'] %}
{% endif %}
traefik.http.routers.matrix-jwt-service.rule={{ matrix_jwt_service_container_labels_traefik_rule }}
{% if matrix_jwt_service_container_labels_traefik_priority | int > 0 %}
traefik.http.routers.matrix-jwt-service.priority={{ matrix_jwt_service_container_labels_traefik_priority }}
{% endif %}
traefik.http.routers.matrix-jwt-service.service=matrix-jwt-service
{% if middlewares | length > 0 %}
traefik.http.routers.matrix-jwt-service.middlewares={{ middlewares | join(',') }}
{% endif %}
traefik.http.routers.matrix-jwt-service.entrypoints={{ matrix_jwt_service_container_labels_traefik_entrypoints }}
traefik.http.routers.matrix-jwt-service.tls={{ matrix_jwt_service_container_labels_traefik_tls | to_json }}
{% if matrix_jwt_service_container_labels_traefik_tls %}
traefik.http.routers.matrix-jwt-service.tls.certResolver={{ matrix_jwt_service_container_labels_traefik_tls_certResolver }}
{% endif %}
{% endif %}
{{ matrix_jwt_service_container_labels_additional_labels }}