2020-04-10 23:44:53 +02:00
#jinja2: lstrip_blocks: "True"
2021-01-25 12:14:46 +02:00
worker_app: synapse.app.{{ matrix_synapse_worker_details.type }}
worker_name: {{ matrix_synapse_worker_details.type ~ ':' ~ matrix_synapse_worker_details.port }}
2020-04-10 23:44:53 +02:00
2021-01-25 13:02:01 +02:00
{% if matrix_synapse_replication_listener_enabled %}
2021-01-25 12:14:46 +02:00
worker_replication_host: matrix-synapse
2020-04-10 23:44:53 +02:00
worker_replication_http_port: {{ matrix_synapse_replication_http_port }}
2021-01-25 13:02:01 +02:00
{% endif %}
{% set has_listeners = (matrix_synapse_worker_details.type not in [ 'appservice', 'federation_sender', 'pusher' ] or matrix_synapse_metrics_enabled) %}
{% set http_resources = [] %}
{% if matrix_synapse_worker_details.type in ['generic_worker', 'frontend_proxy', 'user_dir'] %}
{% set http_resources = http_resources + ['client'] %}
{% endif %}
{% if matrix_synapse_worker_details.type in ['generic_worker'] %}
{% set http_resources = http_resources+ ['federation'] %}
{% endif %}
{% if matrix_synapse_worker_details.type in ['media_repository'] %}
{% set http_resources = http_resources + ['media'] %}
{% endif %}
2020-04-10 23:44:53 +02:00
2021-01-25 13:02:01 +02:00
{% if http_resources|length > 0 or matrix_synapse_metrics_enabled %}
2020-04-10 23:44:53 +02:00
worker_listeners:
2021-01-25 13:02:01 +02:00
{% if http_resources|length > 0 %}
2020-04-10 23:44:53 +02:00
- type: http
2021-01-25 12:29:47 +02:00
bind_addresses: ['::']
2021-01-25 12:14:46 +02:00
port: {{ matrix_synapse_worker_details.port }}
2020-04-10 23:44:53 +02:00
resources:
2021-01-25 13:02:01 +02:00
- names: {{ http_resources|to_json }}
2020-12-02 00:49:23 +02:00
{% endif %}
2021-01-25 12:24:12 +02:00
{% if matrix_synapse_metrics_enabled %}
2020-12-01 23:49:15 +02:00
- type: metrics
2021-02-15 11:19:07 +02:00
bind_addresses: ['0.0.0.0']
2021-01-25 12:14:46 +02:00
port: {{ matrix_synapse_worker_details.metrics_port }}
2021-01-25 12:24:12 +02:00
{% endif %}
2021-01-25 13:02:01 +02:00
{% endif %}
2020-12-01 23:49:15 +02:00
2021-01-25 12:14:46 +02:00
{% if matrix_synapse_worker_details.type == 'frontend_proxy' %}
2021-11-15 22:43:05 +02:00
worker_main_http_uri: http://matrix-synapse:{{ matrix_synapse_container_client_api_port }}
2020-04-10 23:44:53 +02:00
{% endif %}
2020-08-28 13:53:39 +02:00
2020-04-10 23:44:53 +02:00
worker_daemonize: false
worker_log_config: /data/{{ matrix_server_fqn_matrix }}.log.config