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