Matrix Docker Ansible eploy
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 

61 rader
2.2 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. {% if matrix_synapse_replication_listener_enabled %}
  7. worker_replication_host: matrix-synapse
  8. worker_replication_http_port: {{ matrix_synapse_replication_http_port }}
  9. {% endif %}
  10. {% set http_resources = [] %}
  11. {% if matrix_synapse_worker_details.type == 'user_dir' %}
  12. {% set http_resources = http_resources + ['client'] %}
  13. {% endif %}
  14. {% if matrix_synapse_worker_details.type == 'generic_worker' %}
  15. {% set http_resources = http_resources + ['client', 'federation'] %}
  16. {% endif %}
  17. {#
  18. None of the background workers need to handle federation traffic.
  19. Only some of the stream writers need to handle client traffic.
  20. #}
  21. {% if matrix_synapse_worker_details.type == 'stream_writer' and matrix_synapse_worker_details.webserving %}
  22. {% set http_resources = http_resources + ['client'] %}
  23. {% endif %}
  24. {% if matrix_synapse_worker_details.type == 'media_repository' %}
  25. {% set http_resources = http_resources + ['media'] %}
  26. {% endif %}
  27. {% set replication_http_resources = [] %}
  28. {% if matrix_synapse_worker_details.type == 'stream_writer' %}
  29. {# All background workers need to handle replication traffic. #}
  30. {% set replication_http_resources = replication_http_resources + ['replication'] %}
  31. {% endif %}
  32. {% if http_resources|length > 0 or matrix_synapse_metrics_enabled or replication_http_resources|length > 0 %}
  33. worker_listeners:
  34. {% if http_resources|length > 0 %}
  35. - type: http
  36. bind_addresses: ['::']
  37. x_forwarded: true
  38. port: {{ matrix_synapse_worker_details.port }}
  39. resources:
  40. - names: {{ http_resources|to_json }}
  41. {% endif %}
  42. {% if matrix_synapse_metrics_enabled %}
  43. - type: metrics
  44. bind_addresses: ['0.0.0.0']
  45. port: {{ matrix_synapse_worker_details.metrics_port }}
  46. {% endif %}
  47. {% if replication_http_resources|length > 0 %}
  48. - type: http
  49. bind_addresses: ['::']
  50. port: {{ matrix_synapse_worker_details.replication_port }}
  51. resources:
  52. - names: {{ replication_http_resources|to_json }}
  53. {% endif %}
  54. {% endif %}