Matrix Docker Ansible eploy
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 

52 rindas
2.8 KiB

  1. {% if matrix_bot_honoroit_container_labels_traefik_enabled %}
  2. traefik.enable=true
  3. {% if matrix_bot_honoroit_container_labels_traefik_docker_network %}
  4. traefik.docker.network={{ matrix_bot_honoroit_container_labels_traefik_docker_network }}
  5. {% endif %}
  6. {% set middlewares = [] %}
  7. {% set middlewares_metrics = [] %}
  8. {% if matrix_bot_honoroit_container_labels_traefik_path_prefix != '/' %}
  9. traefik.http.middlewares.matrix-bot-honoroit-slashless-redirect.redirectregex.regex=({{ matrix_bot_honoroit_container_labels_traefik_path_prefix | quote }})$
  10. traefik.http.middlewares.matrix-bot-honoroit-slashless-redirect.redirectregex.replacement=${1}/
  11. {% set middlewares = middlewares + ['matrix-bot-honoroit-slashless-redirect'] %}
  12. {% endif %}
  13. {% if matrix_bot_honoroit_container_labels_traefik_path_prefix != '/' %}
  14. traefik.http.middlewares.matrix-bot-honoroit-strip-prefix.stripprefix.prefixes={{ matrix_bot_honoroit_container_labels_traefik_path_prefix }}
  15. {% set middlewares = middlewares + ['matrix-bot-honoroit-strip-prefix'] %}
  16. {% endif %}
  17. {% if matrix_bot_honoroit_container_labels_traefik_additional_response_headers.keys() | length > 0 %}
  18. {% for name, value in matrix_bot_honoroit_container_labels_traefik_additional_response_headers.items() %}
  19. traefik.http.middlewares.matrix-bot-honoroit-add-headers.headers.customresponseheaders.{{ name }}={{ value }}
  20. {% endfor %}
  21. {% set middlewares = middlewares + ['matrix-bot-honoroit-add-headers'] %}
  22. {% endif %}
  23. {% if matrix_bot_honoroit_basicauth_enabled %}
  24. traefik.http.middlewares.matrix-bot-honoroit-auth.basicauth.users={{ lookup('ansible.builtin.file', matrix_bot_honoroit_basicauth_file) }}
  25. {% set middlewares_metrics = middlewares + ['matrix-bot-honoroit-auth'] %}
  26. {% endif %}
  27. {% if middlewares_metrics | length > 0 %}
  28. traefik.http.routers.matrix-bot-honoroit-metrics.rule={{ matrix_bot_honoroit_container_labels_traefik_metrics_rule }}
  29. {% if matrix_bot_honoroit_container_labels_traefik_priority | int > 0 %}
  30. traefik.http.routers.matrix-bot-honoroit-metrics.priority={{ matrix_bot_honoroit_container_labels_traefik_priority }}
  31. {% endif %}
  32. traefik.http.routers.matrix-bot-honoroit-metrics.service=matrix-bot-honoroit
  33. traefik.http.routers.matrix-bot-honoroit-metrics.middlewares={{ middlewares_metrics | join(',') }}
  34. traefik.http.routers.matrix-bot-honoroit-metrics.entrypoints={{ matrix_bot_honoroit_container_labels_traefik_entrypoints }}
  35. traefik.http.routers.matrix-bot-honoroit-metrics.tls={{ matrix_bot_honoroit_container_labels_traefik_tls | to_json }}
  36. {% if matrix_bot_honoroit_container_labels_traefik_tls %}
  37. traefik.http.routers.matrix-bot-honoroit-metrics.tls.certResolver={{ matrix_bot_honoroit_container_labels_traefik_tls_certResolver }}
  38. {% endif %}
  39. traefik.http.services.matrix-bot-honoroit-metrics.loadbalancer.server.port=8080
  40. {% endif %}
  41. {% endif %}
  42. {{ matrix_bot_honoroit_container_labels_additional_labels }}