Matrix Docker Ansible eploy
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 

102 Zeilen
5.7 KiB

  1. {#
  2. SPDX-FileCopyrightText: 2024 MDAD Team and contributors
  3. SPDX-License-Identifier: AGPL-3.0-or-later
  4. #}
  5. {% if matrix_static_files_container_labels_traefik_enabled %}
  6. traefik.enable=true
  7. {% if matrix_static_files_container_labels_traefik_docker_network %}
  8. traefik.docker.network={{ matrix_static_files_container_labels_traefik_docker_network }}
  9. {% endif %}
  10. traefik.http.services.{{ matrix_static_files_identifier }}.loadbalancer.server.port={{ matrix_static_files_environment_variable_server_port }}
  11. {% if matrix_static_files_container_labels_well_known_matrix_endpoint_enabled %}
  12. ############################################################
  13. # #
  14. # Related to /.well-known/matrix on the Matrix domain #
  15. # #
  16. ############################################################
  17. {% set well_known_matrix_endpoint_middlewares = [] %}
  18. {% if matrix_static_files_container_labels_well_known_matrix_endpoint_middleware_compress_enabled %}
  19. traefik.http.middlewares.{{ matrix_static_files_identifier }}-well-known-compress.compress=true
  20. traefik.http.middlewares.{{ matrix_static_files_identifier }}-well-known-compress.compress.minResponseBodyBytes={{ matrix_static_files_container_labels_well_known_matrix_endpoint_middleware_compress_minResponseBodyBytes }}
  21. {% set well_known_matrix_endpoint_middlewares = well_known_matrix_endpoint_middlewares + [matrix_static_files_identifier + '-well-known-compress'] %}
  22. {% endif %}
  23. traefik.http.routers.{{ matrix_static_files_identifier }}-well-known.rule={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_rule }}
  24. {% if well_known_matrix_endpoint_middlewares | length > 0 %}
  25. traefik.http.routers.{{ matrix_static_files_identifier }}-well-known.middlewares={{ well_known_matrix_endpoint_middlewares | join(',') }}
  26. {% endif %}
  27. {% if matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_priority | int > 0 %}
  28. traefik.http.routers.{{ matrix_static_files_identifier }}-well-known.priority={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_priority }}
  29. {% endif %}
  30. traefik.http.routers.{{ matrix_static_files_identifier }}-well-known.service={{ matrix_static_files_identifier }}
  31. traefik.http.routers.{{ matrix_static_files_identifier }}-well-known.entrypoints={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_entrypoints }}
  32. traefik.http.routers.{{ matrix_static_files_identifier }}-well-known.tls={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_tls | to_json }}
  33. {% if matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_tls %}
  34. traefik.http.routers.{{ matrix_static_files_identifier }}-well-known.tls.certResolver={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_tls_certResolver }}
  35. {% endif %}
  36. ############################################################
  37. # #
  38. # /Related to /.well-known/matrix on the Matrix domain #
  39. # #
  40. ############################################################
  41. {% endif %}
  42. {% if matrix_static_files_container_labels_base_domain_enabled %}
  43. ############################################################
  44. # #
  45. # Base domain serving #
  46. # #
  47. ############################################################
  48. {% set middlewares = [] %}
  49. {% if matrix_static_files_container_labels_base_domain_root_path_redirection_enabled %}
  50. traefik.http.middlewares.{{ matrix_static_files_identifier }}-base-domain-root-path-redirect.redirectregex.regex={{ matrix_static_files_container_labels_base_domain_root_path_redirection_regex }}
  51. traefik.http.middlewares.{{ matrix_static_files_identifier }}-base-domain-root-path-redirect.redirectregex.replacement={{ matrix_static_files_container_labels_base_domain_root_path_redirection_url }}
  52. {% set middlewares = middlewares + [matrix_static_files_identifier + '-base-domain-root-path-redirect'] %}
  53. {% endif %}
  54. traefik.http.routers.{{ matrix_static_files_identifier }}-base-domain.rule={{ matrix_static_files_container_labels_base_domain_traefik_rule }}
  55. {% if matrix_static_files_container_labels_base_domain_traefik_priority | int > 0 %}
  56. traefik.http.routers.{{ matrix_static_files_identifier }}-base-domain.priority={{ matrix_static_files_container_labels_base_domain_traefik_priority }}
  57. {% endif %}
  58. {% if middlewares | length > 0 %}
  59. traefik.http.routers.{{ matrix_static_files_identifier }}-base-domain.middlewares={{ middlewares | join(',') }}
  60. {% endif %}
  61. traefik.http.routers.{{ matrix_static_files_identifier }}-base-domain.service={{ matrix_static_files_identifier }}
  62. traefik.http.routers.{{ matrix_static_files_identifier }}-base-domain.entrypoints={{ matrix_static_files_container_labels_base_domain_traefik_entrypoints }}
  63. traefik.http.routers.{{ matrix_static_files_identifier }}-base-domain.tls={{ matrix_static_files_container_labels_base_domain_traefik_tls | to_json }}
  64. {% if matrix_static_files_container_labels_base_domain_traefik_tls %}
  65. traefik.http.routers.{{ matrix_static_files_identifier }}-base-domain.tls.certResolver={{ matrix_static_files_container_labels_base_domain_traefik_tls_certResolver }}
  66. {% endif %}
  67. ############################################################
  68. # #
  69. # /Base domain serving #
  70. # #
  71. ############################################################
  72. {% endif %}
  73. {% endif %}
  74. {{ matrix_static_files_container_labels_additional_labels }}