mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-12-29 04:17:17 +01:00
cea437c844
Possibly fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3900 This patch hasn't been tested.
59 lines
3.0 KiB
Django/Jinja
59 lines
3.0 KiB
Django/Jinja
{% if matrix_mautrix_discord_container_labels_traefik_enabled %}
|
|
traefik.enable=true
|
|
|
|
{% if matrix_mautrix_discord_container_labels_traefik_docker_network %}
|
|
traefik.docker.network={{ matrix_mautrix_discord_container_labels_traefik_docker_network }}
|
|
{% endif %}
|
|
|
|
traefik.http.services.matrix-mautrix-discord.loadbalancer.server.port=8080
|
|
|
|
{% if matrix_mautrix_discord_container_labels_avatar_proxy_enabled %}
|
|
############################################################
|
|
# #
|
|
# Avatar proxy #
|
|
# #
|
|
############################################################
|
|
|
|
{% set middlewares = [] %}
|
|
|
|
{% if matrix_mautrix_discord_container_labels_traefik_path_prefix != '/' %}
|
|
traefik.http.middlewares.matrix-mautrix-discord-slashless-redirect.redirectregex.regex=({{ matrix_mautrix_discord_container_labels_traefik_path_prefix | quote }})$
|
|
traefik.http.middlewares.matrix-mautrix-discord-slashless-redirect.redirectregex.replacement=${1}/
|
|
{% set middlewares = middlewares + ['matrix-mautrix-discord-slashless-redirect'] %}
|
|
{% endif %}
|
|
|
|
{% if matrix_mautrix_discord_container_labels_traefik_path_prefix != '/' %}
|
|
traefik.http.middlewares.matrix-mautrix-discord-strip-prefix.stripprefix.prefixes={{ matrix_mautrix_discord_container_labels_traefik_path_prefix }}
|
|
{% set middlewares = middlewares + ['matrix-mautrix-discord-strip-prefix'] %}
|
|
{% endif %}
|
|
|
|
traefik.http.routers.matrix-mautrix-discord-avatar-proxy.rule={{ matrix_mautrix_discord_container_labels_avatar_proxy_traefik_rule }}
|
|
|
|
{% if matrix_mautrix_discord_container_labels_avatar_proxy_traefik_priority | int > 0 %}
|
|
traefik.http.routers.matrix-mautrix-discord-avatar-proxy.priority={{ matrix_mautrix_discord_container_labels_avatar_proxy_traefik_priority }}
|
|
{% endif %}
|
|
|
|
{% if middlewares | length > 0 %}
|
|
traefik.http.routers.matrix-mautrix-discord-avatar-proxy.middlewares={{ middlewares | join(',') }}
|
|
{% endif %}
|
|
|
|
traefik.http.routers.matrix-mautrix-discord-avatar-proxy.service=matrix-mautrix-discord
|
|
traefik.http.routers.matrix-mautrix-discord-avatar-proxy.entrypoints={{ matrix_mautrix_discord_container_labels_avatar_proxy_traefik_entrypoints }}
|
|
|
|
traefik.http.routers.matrix-mautrix-discord-avatar-proxy.tls={{ matrix_mautrix_discord_container_labels_avatar_proxy_traefik_tls | to_json }}
|
|
{% if matrix_mautrix_discord_container_labels_avatar_proxy_traefik_tls %}
|
|
traefik.http.routers.matrix-mautrix-discord-avatar-proxy.tls.certResolver={{ matrix_mautrix_discord_container_labels_avatar_proxy_traefik_tls_certResolver }}
|
|
{% endif %}
|
|
|
|
############################################################
|
|
# #
|
|
# /Avatar proxy #
|
|
# #
|
|
############################################################
|
|
{% endif %}
|
|
|
|
|
|
{% endif %}
|
|
|
|
{{ matrix_mautrix_discord_container_labels_additional_labels }}
|