Matrix Docker Ansible eploy
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 

187 linhas
9.9 KiB

  1. {% if matrix_hookshot_container_labels_traefik_enabled %}
  2. traefik.enable=true
  3. {% if matrix_hookshot_container_labels_traefik_docker_network %}
  4. traefik.docker.network={{ matrix_hookshot_container_labels_traefik_docker_network }}
  5. {% endif %}
  6. {% if matrix_hookshot_container_labels_webhooks_enabled %}
  7. ############################################################
  8. # #
  9. # Webhooks #
  10. # #
  11. ############################################################
  12. traefik.http.services.matrix-hookshot-webhooks.loadbalancer.server.port={{ matrix_hookshot_webhook_port }}
  13. traefik.http.middlewares.matrix-hookshot-webhooks-strip-prefix.stripprefix.prefixes={{ matrix_hookshot_webhook_endpoint }}
  14. traefik.http.routers.matrix-hookshot-webhooks.rule={{ matrix_hookshot_container_labels_webhooks_traefik_rule }}
  15. traefik.http.routers.matrix-hookshot-webhooks.middlewares=matrix-hookshot-webhooks-strip-prefix
  16. {% if matrix_hookshot_container_labels_webhooks_traefik_priority | int > 0 %}
  17. traefik.http.routers.matrix-hookshot-webhooks.priority={{ matrix_hookshot_container_labels_webhooks_traefik_priority }}
  18. {% endif %}
  19. traefik.http.routers.matrix-hookshot-webhooks.service=matrix-hookshot-webhooks
  20. traefik.http.routers.matrix-hookshot-webhooks.entrypoints={{ matrix_hookshot_container_labels_webhooks_traefik_entrypoints }}
  21. traefik.http.routers.matrix-hookshot-webhooks.tls={{ matrix_hookshot_container_labels_webhooks_traefik_tls | to_json }}
  22. {% if matrix_hookshot_container_labels_webhooks_traefik_tls %}
  23. traefik.http.routers.matrix-hookshot-webhooks.tls.certResolver={{ matrix_hookshot_container_labels_webhooks_traefik_tls_certResolver }}
  24. {% endif %}
  25. ############################################################
  26. # #
  27. # /Webhooks #
  28. # #
  29. ############################################################
  30. {% endif %}
  31. {% if matrix_hookshot_container_labels_appservice_enabled %}
  32. ############################################################
  33. # #
  34. # Appservice #
  35. # #
  36. ############################################################
  37. traefik.http.services.matrix-hookshot-appservice.loadbalancer.server.port={{ matrix_hookshot_appservice_port }}
  38. traefik.http.middlewares.matrix-hookshot-appservice-strip-prefix.stripprefix.prefixes={{ matrix_hookshot_appservice_endpoint }}
  39. traefik.http.routers.matrix-hookshot-appservice.rule={{ matrix_hookshot_container_labels_appservice_traefik_rule }}
  40. traefik.http.routers.matrix-hookshot-appservice.middlewares=matrix-hookshot-appservice-strip-prefix
  41. {% if matrix_hookshot_container_labels_appservice_traefik_priority | int > 0 %}
  42. traefik.http.routers.matrix-hookshot-appservice.priority={{ matrix_hookshot_container_labels_appservice_traefik_priority }}
  43. {% endif %}
  44. traefik.http.routers.matrix-hookshot-appservice.service=matrix-hookshot-appservice
  45. traefik.http.routers.matrix-hookshot-appservice.entrypoints={{ matrix_hookshot_container_labels_appservice_traefik_entrypoints }}
  46. traefik.http.routers.matrix-hookshot-appservice.tls={{ matrix_hookshot_container_labels_appservice_traefik_tls | to_json }}
  47. {% if matrix_hookshot_container_labels_appservice_traefik_tls %}
  48. traefik.http.routers.matrix-hookshot-appservice.tls.certResolver={{ matrix_hookshot_container_labels_appservice_traefik_tls_certResolver }}
  49. {% endif %}
  50. ############################################################
  51. # #
  52. # /Appservice #
  53. # #
  54. ############################################################
  55. {% endif %}
  56. {% if matrix_hookshot_container_labels_widgets_enabled %}
  57. ############################################################
  58. # #
  59. # Widgets #
  60. # #
  61. ############################################################
  62. traefik.http.services.matrix-hookshot-widgets.loadbalancer.server.port={{ matrix_hookshot_widgets_port }}
  63. traefik.http.middlewares.matrix-hookshot-widgets-strip-prefix.stripprefix.prefixes={{ matrix_hookshot_widgets_endpoint }}
  64. traefik.http.routers.matrix-hookshot-widgets.rule={{ matrix_hookshot_container_labels_widgets_traefik_rule }}
  65. traefik.http.routers.matrix-hookshot-widgets.middlewares=matrix-hookshot-widgets-strip-prefix
  66. {% if matrix_hookshot_container_labels_widgets_traefik_priority | int > 0 %}
  67. traefik.http.routers.matrix-hookshot-widgets.priority={{ matrix_hookshot_container_labels_widgets_traefik_priority }}
  68. {% endif %}
  69. traefik.http.routers.matrix-hookshot-widgets.service=matrix-hookshot-widgets
  70. traefik.http.routers.matrix-hookshot-widgets.entrypoints={{ matrix_hookshot_container_labels_widgets_traefik_entrypoints }}
  71. traefik.http.routers.matrix-hookshot-widgets.tls={{ matrix_hookshot_container_labels_widgets_traefik_tls | to_json }}
  72. {% if matrix_hookshot_container_labels_widgets_traefik_tls %}
  73. traefik.http.routers.matrix-hookshot-widgets.tls.certResolver={{ matrix_hookshot_container_labels_widgets_traefik_tls_certResolver }}
  74. {% endif %}
  75. ############################################################
  76. # #
  77. # /Widgets #
  78. # #
  79. ############################################################
  80. {% endif %}
  81. {% if matrix_hookshot_container_labels_provisioning_enabled %}
  82. ############################################################
  83. # #
  84. # Provisioning #
  85. # #
  86. ############################################################
  87. traefik.http.services.matrix-hookshot-provisioning.loadbalancer.server.port={{ matrix_hookshot_provisioning_port }}
  88. traefik.http.middlewares.matrix-hookshot-provisioning-strip-prefix.stripprefix.prefixes={{ matrix_hookshot_provisioning_endpoint }}
  89. traefik.http.routers.matrix-hookshot-provisioning.rule={{ matrix_hookshot_container_labels_provisioning_traefik_rule }}
  90. traefik.http.routers.matrix-hookshot-provisioning.middlewares=matrix-hookshot-provisioning-strip-prefix
  91. {% if matrix_hookshot_container_labels_provisioning_traefik_priority | int > 0 %}
  92. traefik.http.routers.matrix-hookshot-provisioning.priority={{ matrix_hookshot_container_labels_provisioning_traefik_priority }}
  93. {% endif %}
  94. traefik.http.routers.matrix-hookshot-provisioning.service=matrix-hookshot-provisioning
  95. traefik.http.routers.matrix-hookshot-provisioning.entrypoints={{ matrix_hookshot_container_labels_provisioning_traefik_entrypoints }}
  96. traefik.http.routers.matrix-hookshot-provisioning.tls={{ matrix_hookshot_container_labels_provisioning_traefik_tls | to_json }}
  97. {% if matrix_hookshot_container_labels_provisioning_traefik_tls %}
  98. traefik.http.routers.matrix-hookshot-provisioning.tls.certResolver={{ matrix_hookshot_container_labels_provisioning_traefik_tls_certResolver }}
  99. {% endif %}
  100. ############################################################
  101. # #
  102. # /Provisioning #
  103. # #
  104. ############################################################
  105. {% endif %}
  106. {% if matrix_hookshot_container_labels_metrics_enabled %}
  107. ############################################################
  108. # #
  109. # Metrics #
  110. # #
  111. ############################################################
  112. traefik.http.services.matrix-hookshot-metrics.loadbalancer.server.port={{ matrix_hookshot_metrics_port }}
  113. {% set metricsMiddlewares = ['matrix-hookshot-metrics-replace-path'] %}
  114. traefik.http.middlewares.matrix-hookshot-metrics-replace-path.replacepath.path=/metrics
  115. {% if matrix_hookshot_container_labels_metrics_middleware_basic_auth_enabled %}
  116. {% set metricsMiddlewares = metricsMiddlewares + ['matrix-hookshot-metrics-basic-auth'] %}
  117. traefik.http.middlewares.matrix-hookshot-metrics-basic-auth.basicauth.users={{ matrix_hookshot_container_labels_metrics_middleware_basic_auth_users }}
  118. {% endif %}
  119. traefik.http.routers.matrix-hookshot-metrics.rule={{ matrix_hookshot_container_labels_metrics_traefik_rule }}
  120. traefik.http.routers.matrix-hookshot-metrics.middlewares={{ metricsMiddlewares | join(',') }}
  121. {% if matrix_hookshot_container_labels_metrics_traefik_priority | int > 0 %}
  122. traefik.http.routers.matrix-hookshot-metrics.priority={{ matrix_hookshot_container_labels_metrics_traefik_priority }}
  123. {% endif %}
  124. traefik.http.routers.matrix-hookshot-metrics.service=matrix-hookshot-metrics
  125. traefik.http.routers.matrix-hookshot-metrics.entrypoints={{ matrix_hookshot_container_labels_metrics_traefik_entrypoints }}
  126. traefik.http.routers.matrix-hookshot-metrics.tls={{ matrix_hookshot_container_labels_metrics_traefik_tls | to_json }}
  127. {% if matrix_hookshot_container_labels_metrics_traefik_tls %}
  128. traefik.http.routers.matrix-hookshot-metrics.tls.certResolver={{ matrix_hookshot_container_labels_metrics_traefik_tls_certResolver }}
  129. {% endif %}
  130. ############################################################
  131. # #
  132. # /Metrics #
  133. # #
  134. ############################################################
  135. {% endif %}
  136. {% endif %}
  137. {{ matrix_hookshot_container_labels_additional_labels }}