Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

65 lines
3.1 KiB

  1. {#
  2. SPDX-FileCopyrightText: 2024 Slavi Pantaleev
  3. SPDX-License-Identifier: AGPL-3.0-or-later
  4. #}
  5. {% if matrix_mautrix_discord_container_labels_traefik_enabled %}
  6. traefik.enable=true
  7. {% if matrix_mautrix_discord_container_labels_traefik_docker_network %}
  8. traefik.docker.network={{ matrix_mautrix_discord_container_labels_traefik_docker_network }}
  9. {% endif %}
  10. traefik.http.services.matrix-mautrix-discord.loadbalancer.server.port=8080
  11. {% if matrix_mautrix_discord_container_labels_avatar_proxy_enabled %}
  12. ############################################################
  13. # #
  14. # Avatar proxy #
  15. # #
  16. ############################################################
  17. {% set middlewares = [] %}
  18. {% if matrix_mautrix_discord_container_labels_traefik_path_prefix != '/' %}
  19. traefik.http.middlewares.matrix-mautrix-discord-slashless-redirect.redirectregex.regex=({{ matrix_mautrix_discord_container_labels_traefik_path_prefix | quote }})$
  20. traefik.http.middlewares.matrix-mautrix-discord-slashless-redirect.redirectregex.replacement=${1}/
  21. {% set middlewares = middlewares + ['matrix-mautrix-discord-slashless-redirect'] %}
  22. {% endif %}
  23. {% if matrix_mautrix_discord_container_labels_traefik_path_prefix != '/' %}
  24. traefik.http.middlewares.matrix-mautrix-discord-strip-prefix.stripprefix.prefixes={{ matrix_mautrix_discord_container_labels_traefik_path_prefix }}
  25. {% set middlewares = middlewares + ['matrix-mautrix-discord-strip-prefix'] %}
  26. {% endif %}
  27. traefik.http.routers.matrix-mautrix-discord-avatar-proxy.rule={{ matrix_mautrix_discord_container_labels_avatar_proxy_traefik_rule }}
  28. {% if matrix_mautrix_discord_container_labels_avatar_proxy_traefik_priority | int > 0 %}
  29. traefik.http.routers.matrix-mautrix-discord-avatar-proxy.priority={{ matrix_mautrix_discord_container_labels_avatar_proxy_traefik_priority }}
  30. {% endif %}
  31. {% if middlewares | length > 0 %}
  32. traefik.http.routers.matrix-mautrix-discord-avatar-proxy.middlewares={{ middlewares | join(',') }}
  33. {% endif %}
  34. traefik.http.routers.matrix-mautrix-discord-avatar-proxy.service=matrix-mautrix-discord
  35. traefik.http.routers.matrix-mautrix-discord-avatar-proxy.entrypoints={{ matrix_mautrix_discord_container_labels_avatar_proxy_traefik_entrypoints }}
  36. traefik.http.routers.matrix-mautrix-discord-avatar-proxy.tls={{ matrix_mautrix_discord_container_labels_avatar_proxy_traefik_tls | to_json }}
  37. {% if matrix_mautrix_discord_container_labels_avatar_proxy_traefik_tls %}
  38. traefik.http.routers.matrix-mautrix-discord-avatar-proxy.tls.certResolver={{ matrix_mautrix_discord_container_labels_avatar_proxy_traefik_tls_certResolver }}
  39. {% endif %}
  40. ############################################################
  41. # #
  42. # /Avatar proxy #
  43. # #
  44. ############################################################
  45. {% endif %}
  46. {% endif %}
  47. {{ matrix_mautrix_discord_container_labels_additional_labels }}