Matrix Docker Ansible eploy
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 

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