summary refs log tree commit diff
path: root/scripts-dev/workers_setup/worker.yaml.j2
blob: 81dae3b8a4d03e5ea2f514c3c51a67a9932a8c69 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{% set main_worker = workers_by_name.main %}

{% if worker.kind == "main" %}

worker_app: synapse.app.homeserver

{% else %}

worker_app: synapse.app.generic_worker
worker_name: {{ worker.name }}
# The replication listener on the main synapse process.
worker_replication_host: {{ main_worker.ip }}
worker_replication_http_port: 9090
worker_listeners:
  - type: http
    bind_address: {{ worker.ip }}
    port: 8080
    resources:
    - names:
      - client
      - federation
{%- if worker.kind == "media" %}
      - media
{%- endif %}
  - type: http
    bind_address: {{ worker.ip }}
    port: 9090
    resources:
    - names: [replication]

worker_log_config: '{{ worker_dir }}.logging/{{ worker.name }}.logging.yaml'
worker_pid_file: '{{ logs_dir }}/{{ worker.name }}.pid'

worker_main_http_uri: http://{{ main_worker.ip }}:8080

{% endif %}