mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2025-01-31 04:14:59 +01:00
50 lines
2.5 KiB
Django/Jinja
50 lines
2.5 KiB
Django/Jinja
{% if livekit_server_container_labels_traefik_enabled %}
|
|
traefik.enable=true
|
|
|
|
{% if livekit_server_container_labels_traefik_docker_network %}
|
|
traefik.docker.network={{ livekit_server_container_labels_traefik_docker_network }}
|
|
{% endif %}
|
|
|
|
traefik.http.services.{{ livekit_server_identifier }}.loadbalancer.server.port={{ livekit_server_config_port }}
|
|
|
|
{% set middlewares = [] %}
|
|
|
|
{% if livekit_server_container_labels_traefik_path_prefix != '/' %}
|
|
traefik.http.middlewares.{{ livekit_server_identifier }}-slashless-redirect.redirectregex.regex=({{ livekit_server_container_labels_traefik_path_prefix | quote }})$
|
|
traefik.http.middlewares.{{ livekit_server_identifier }}-slashless-redirect.redirectregex.replacement=${1}/
|
|
{% set middlewares = middlewares + [livekit_server_identifier + '-server-slashless-redirect'] %}
|
|
|
|
traefik.http.middlewares.{{ livekit_server_identifier }}-strip-prefix.stripprefix.prefixes={{ livekit_server_container_labels_traefik_path_prefix }}
|
|
{% set middlewares = middlewares + [livekit_server_identifier + '-strip-prefix'] %}
|
|
{% endif %}
|
|
|
|
{% if livekit_server_container_labels_traefik_additional_response_headers.keys() | length > 0 %}
|
|
{% for name, value in livekit_server_container_labels_traefik_additional_response_headers.items() %}
|
|
traefik.http.middlewares.{{ livekit_server_identifier }}-add-headers.headers.customresponseheaders.{{ name }}={{ value }}
|
|
{% endfor %}
|
|
{% set middlewares = middlewares + [livekit_server_identifier + '-add-headers'] %}
|
|
{% endif %}
|
|
|
|
traefik.http.routers.{{ livekit_server_identifier }}.rule={{ livekit_server_container_labels_traefik_rule }}
|
|
|
|
{% if livekit_server_container_labels_traefik_priority | int > 0 %}
|
|
traefik.http.routers.{{ livekit_server_identifier }}.priority={{ livekit_server_container_labels_traefik_priority }}
|
|
{% endif %}
|
|
|
|
traefik.http.routers.{{ livekit_server_identifier }}.service={{ livekit_server_identifier }}
|
|
|
|
{% if middlewares | length > 0 %}
|
|
traefik.http.routers.{{ livekit_server_identifier }}.middlewares={{ middlewares | join(',') }}
|
|
{% endif %}
|
|
|
|
traefik.http.routers.{{ livekit_server_identifier }}.entrypoints={{ livekit_server_container_labels_traefik_entrypoints }}
|
|
|
|
traefik.http.routers.{{ livekit_server_identifier }}.tls={{ livekit_server_container_labels_traefik_tls | to_json }}
|
|
{% if livekit_server_container_labels_traefik_tls %}
|
|
traefik.http.routers.{{ livekit_server_identifier }}.tls.certResolver={{ livekit_server_container_labels_traefik_tls_certResolver }}
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
{{ livekit_server_container_labels_additional_labels }}
|