Matrix Docker Ansible eploy
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 

63 líneas
3.3 KiB

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