# This is a configuration template for a single worker instance, and is # used by Dockerfile-workers. # Values will be change depending on whichever workers are selected when # running that image. worker_app: "{{ app }}" worker_name: "{{ name }}" worker_listeners: - type: http {% if using_unix_sockets %} path: "/run/worker.{{ port }}" {% else %} port: {{ port }} {% endif %} {% if listener_resources %} resources: - names: {%- for resource in listener_resources %} - {{ resource }} {%- endfor %} {% endif %} - type: metrics port: {{ port + 1 }} resources: - metrics worker_log_config: {{ worker_log_config_filepath }} database: name: "psycopg2" args: user: "{{ POSTGRES_USER or "synapse" }}" password: "{{ POSTGRES_PASSWORD }}" database: "{{ POSTGRES_DB or "synapse" }}" {% if not SYNAPSE_USE_UNIX_SOCKET %} {# Synapse will use a default unix socket for Postgres when host/port is not specified (behavior from `psycopg2`). #} host: "{{ POSTGRES_HOST or "db" }}" port: "{{ POSTGRES_PORT or "5432" }}" {% endif %} cp_min: {{ POSTGRES_CP_MIN or 5 }} cp_max: {{ POSTGRES_CP_MAX or 10 }} application_name: "{{ name }}" {{ worker_extra_conf }}