Matrix Docker Ansible eploy
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 

55 рядки
2.6 KiB

  1. {#
  2. SPDX-FileCopyrightText: 2023 Nikita Chernyi
  3. SPDX-FileCopyrightText: 2023 - 2024 Slavi Pantaleev
  4. SPDX-License-Identifier: AGPL-3.0-or-later
  5. #}
  6. {% if matrix_bot_buscarron_container_labels_traefik_enabled %}
  7. traefik.enable=true
  8. {% if matrix_bot_buscarron_container_labels_traefik_docker_network %}
  9. traefik.docker.network={{ matrix_bot_buscarron_container_labels_traefik_docker_network }}
  10. {% endif %}
  11. traefik.http.services.matrix-bot-buscarron.loadbalancer.server.port=8080
  12. {% set middlewares = [] %}
  13. {% set middlewares_metrics = [] %}
  14. {% if matrix_bot_buscarron_container_labels_traefik_path_prefix != '/' %}
  15. traefik.http.middlewares.matrix-bot-buscarron-slashless-redirect.redirectregex.regex=({{ matrix_bot_buscarron_container_labels_traefik_path_prefix | quote }})$
  16. traefik.http.middlewares.matrix-bot-buscarron-slashless-redirect.redirectregex.replacement=${1}/
  17. {% set middlewares = middlewares + ['matrix-bot-buscarron-slashless-redirect'] %}
  18. {% endif %}
  19. {% if matrix_bot_buscarron_container_labels_traefik_path_prefix != '/' %}
  20. traefik.http.middlewares.matrix-bot-buscarron-strip-prefix.stripprefix.prefixes={{ matrix_bot_buscarron_container_labels_traefik_path_prefix }}
  21. {% set middlewares = middlewares + ['matrix-bot-buscarron-strip-prefix'] %}
  22. {% endif %}
  23. {% if matrix_bot_buscarron_container_labels_traefik_additional_response_headers.keys() | length > 0 %}
  24. {% for name, value in matrix_bot_buscarron_container_labels_traefik_additional_response_headers.items() %}
  25. traefik.http.middlewares.matrix-bot-buscarron-add-headers.headers.customresponseheaders.{{ name }}={{ value }}
  26. {% endfor %}
  27. {% set middlewares = middlewares + ['matrix-bot-buscarron-add-headers'] %}
  28. {% endif %}
  29. traefik.http.routers.matrix-bot-buscarron.rule={{ matrix_bot_buscarron_container_labels_traefik_rule }}
  30. {% if matrix_bot_buscarron_container_labels_traefik_priority | int > 0 %}
  31. traefik.http.routers.matrix-bot-buscarron.priority={{ matrix_bot_buscarron_container_labels_traefik_priority }}
  32. {% endif %}
  33. traefik.http.routers.matrix-bot-buscarron.service=matrix-bot-buscarron
  34. {% if middlewares | length > 0 %}
  35. traefik.http.routers.matrix-bot-buscarron.middlewares={{ middlewares | join(',') }}
  36. {% endif %}
  37. traefik.http.routers.matrix-bot-buscarron.entrypoints={{ matrix_bot_buscarron_container_labels_traefik_entrypoints }}
  38. traefik.http.routers.matrix-bot-buscarron.tls={{ matrix_bot_buscarron_container_labels_traefik_tls | to_json }}
  39. {% if matrix_bot_buscarron_container_labels_traefik_tls %}
  40. traefik.http.routers.matrix-bot-buscarron.tls.certResolver={{ matrix_bot_buscarron_container_labels_traefik_tls_certResolver }}
  41. {% endif %}
  42. {% endif %}
  43. {{ matrix_bot_buscarron_container_labels_additional_labels }}