Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

46 lines
1.7 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. worker_app: synapse.app.{{ matrix_synapse_worker_details.type }}
  3. worker_name: {{ matrix_synapse_worker_details.type ~ ':' ~ matrix_synapse_worker_details.port }}
  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 has_listeners = (matrix_synapse_worker_details.type not in [ 'appservice', 'federation_sender', 'pusher' ] or matrix_synapse_metrics_enabled) %}
  9. {% set http_resources = [] %}
  10. {% if matrix_synapse_worker_details.type in ['generic_worker', 'frontend_proxy', 'user_dir'] %}
  11. {% set http_resources = http_resources + ['client'] %}
  12. {% endif %}
  13. {% if matrix_synapse_worker_details.type in ['generic_worker'] %}
  14. {% set http_resources = http_resources+ ['federation'] %}
  15. {% endif %}
  16. {% if matrix_synapse_worker_details.type in ['media_repository'] %}
  17. {% set http_resources = http_resources + ['media'] %}
  18. {% endif %}
  19. {% if http_resources|length > 0 or matrix_synapse_metrics_enabled %}
  20. worker_listeners:
  21. {% if http_resources|length > 0 %}
  22. - type: http
  23. bind_addresses: ['::']
  24. port: {{ matrix_synapse_worker_details.port }}
  25. resources:
  26. - names: {{ http_resources|to_json }}
  27. {% endif %}
  28. {% if matrix_synapse_metrics_enabled %}
  29. - type: metrics
  30. bind_addresses: ['0.0.0.0']
  31. port: {{ matrix_synapse_worker_details.metrics_port }}
  32. {% endif %}
  33. {% endif %}
  34. {% if matrix_synapse_worker_details.type == 'frontend_proxy' %}
  35. worker_main_http_uri: http://matrix-synapse:{{ matrix_synapse_container_client_api_port }}
  36. {% endif %}
  37. worker_daemonize: false
  38. worker_log_config: /data/{{ matrix_server_fqn_matrix }}.log.config