Matrix Docker Ansible eploy
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 

56 satır
2.0 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. worker_app: synapse.app.{{ matrix_synapse_worker_details.app }}
  3. worker_name: {{ matrix_synapse_worker_details.name }}
  4. worker_daemonize: false
  5. worker_log_config: /data/{{ matrix_server_fqn_matrix }}.log.config
  6. {% set http_resources = [] %}
  7. {% if matrix_synapse_worker_details.type == 'user_dir' %}
  8. {% set http_resources = http_resources + ['client'] %}
  9. {% endif %}
  10. {% if matrix_synapse_worker_details.type == 'generic_worker' %}
  11. {% set http_resources = http_resources + ['client', 'federation'] %}
  12. {% endif %}
  13. {#
  14. None of the background workers need to handle federation traffic.
  15. Only some of the stream writers need to handle client traffic.
  16. #}
  17. {% if matrix_synapse_worker_details.type == 'stream_writer' and matrix_synapse_worker_details.webserving %}
  18. {% set http_resources = http_resources + ['client'] %}
  19. {% endif %}
  20. {% if matrix_synapse_worker_details.type == 'media_repository' %}
  21. {% set http_resources = http_resources + ['media'] %}
  22. {% endif %}
  23. {% set replication_http_resources = [] %}
  24. {% if matrix_synapse_worker_details.type == 'stream_writer' %}
  25. {# All background workers need to handle replication traffic. #}
  26. {% set replication_http_resources = replication_http_resources + ['replication'] %}
  27. {% endif %}
  28. {% if http_resources|length > 0 or matrix_synapse_metrics_enabled or replication_http_resources|length > 0 %}
  29. worker_listeners:
  30. {% if http_resources|length > 0 %}
  31. - type: http
  32. bind_addresses: ['::']
  33. x_forwarded: true
  34. port: {{ matrix_synapse_worker_details.port }}
  35. resources:
  36. - names: {{ http_resources|to_json }}
  37. {% endif %}
  38. {% if matrix_synapse_metrics_enabled %}
  39. - type: metrics
  40. bind_addresses: ['0.0.0.0']
  41. port: {{ matrix_synapse_worker_details.metrics_port }}
  42. {% endif %}
  43. {% if replication_http_resources|length > 0 %}
  44. - type: http
  45. bind_addresses: ['::']
  46. port: {{ matrix_synapse_worker_details.replication_port }}
  47. resources:
  48. - names: {{ replication_http_resources|to_json }}
  49. {% endif %}
  50. {% endif %}