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

96 строки
5.6 KiB

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