Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

60 строки
2.7 KiB

  1. {#
  2. SPDX-FileCopyrightText: 2024 MDAD project contributors
  3. SPDX-License-Identifier: AGPL-3.0-or-later
  4. #}
  5. {% if matrix_bot_draupnir_container_labels_traefik_enabled %}
  6. traefik.enable=true
  7. {% if matrix_bot_draupnir_container_labels_traefik_docker_network %}
  8. traefik.docker.network={{ matrix_bot_draupnir_container_labels_traefik_docker_network }}
  9. {% endif %}
  10. traefik.http.services.matrix-bot-draupnir.loadbalancer.server.port=8080
  11. ############################################################
  12. # #
  13. # Abuse Reports (/_matrix/client/../rooms/../report) #
  14. # #
  15. ############################################################
  16. {% set middlewares = [] %}
  17. traefik.http.middlewares.matrix-bot-draupnir-redirect.replacepathregex.regex=^/_matrix/client/(r0|v3)/rooms/([^/]*)/report/(.*)$
  18. traefik.http.middlewares.matrix-bot-draupnir-redirect.replacepathregex.replacement=/api/1/report/$2/$3
  19. {% set middlewares = middlewares + ['matrix-bot-draupnir-redirect'] %}
  20. traefik.http.middlewares.matrix-bot-draupnir-cors.headers.accesscontrolalloworiginlist=*
  21. traefik.http.middlewares.matrix-bot-draupnir-cors.headers.accesscontrolallowheaders=Content-Type,Authorization
  22. traefik.http.middlewares.matrix-bot-draupnir-cors.headers.accesscontrolallowmethods=POST,OPTIONS
  23. {% set middlewares = middlewares + ['matrix-bot-draupnir-cors'] %}
  24. traefik.http.routers.matrix-bot-draupnir.rule={{ matrix_bot_draupnir_container_labels_traefik_rule }}
  25. {% if matrix_bot_draupnir_container_labels_traefik_priority | int > 0 %}
  26. traefik.http.routers.matrix-bot-draupnir.priority={{ matrix_bot_draupnir_container_labels_traefik_priority }}
  27. {% endif %}
  28. {% if middlewares | length > 0 %}
  29. traefik.http.routers.matrix-bot-draupnir.middlewares={{ middlewares | join(',') }}
  30. {% endif %}
  31. traefik.http.routers.matrix-bot-draupnir.service=matrix-bot-draupnir
  32. traefik.http.routers.matrix-bot-draupnir.entrypoints={{ matrix_bot_draupnir_container_labels_traefik_entrypoints }}
  33. traefik.http.routers.matrix-bot-draupnir.tls={{ matrix_bot_draupnir_container_labels_traefik_tls | to_json }}
  34. {% if matrix_bot_draupnir_container_labels_traefik_tls %}
  35. traefik.http.routers.matrix-bot-draupnir.tls.certResolver={{ matrix_bot_draupnir_container_labels_traefik_tls_certResolver }}
  36. {% endif %}
  37. ############################################################
  38. # #
  39. # /Abuse Reports (/_matrix/client/../rooms/../report) #
  40. # #
  41. ############################################################
  42. {% endif %}
  43. {{ matrix_bot_draupnir_container_labels_traefik_labels_additional_labels }}