2022-06-30 14:58:12 +03:00
|
|
|
{% if use_forking_launcher %}
|
|
|
|
[program:synapse_fork]
|
|
|
|
command=/usr/local/bin/python -m synapse.app.complement_fork_starter
|
|
|
|
{{ main_config_path }}
|
|
|
|
synapse.app.homeserver
|
|
|
|
--config-path="{{ main_config_path }}"
|
|
|
|
--config-path=/conf/workers/shared.yaml
|
|
|
|
{%- for worker in workers %}
|
|
|
|
-- {{ worker.app }}
|
|
|
|
--config-path="{{ main_config_path }}"
|
|
|
|
--config-path=/conf/workers/shared.yaml
|
|
|
|
--config-path=/conf/workers/{{ worker.name }}.yaml
|
|
|
|
{%- endfor %}
|
|
|
|
stdout_logfile=/dev/stdout
|
|
|
|
stdout_logfile_maxbytes=0
|
|
|
|
stderr_logfile=/dev/stderr
|
|
|
|
stderr_logfile_maxbytes=0
|
|
|
|
autorestart=unexpected
|
|
|
|
exitcodes=0
|
|
|
|
|
|
|
|
{% else %}
|
2022-06-27 13:43:20 +03:00
|
|
|
[program:synapse_main]
|
|
|
|
command=/usr/local/bin/prefix-log /usr/local/bin/python -m synapse.app.homeserver
|
|
|
|
--config-path="{{ main_config_path }}"
|
|
|
|
--config-path=/conf/workers/shared.yaml
|
|
|
|
priority=10
|
|
|
|
# Log startup failures to supervisord's stdout/err
|
|
|
|
# Regular synapse logs will still go in the configured data directory
|
|
|
|
stdout_logfile=/dev/stdout
|
|
|
|
stdout_logfile_maxbytes=0
|
|
|
|
stderr_logfile=/dev/stderr
|
|
|
|
stderr_logfile_maxbytes=0
|
|
|
|
autorestart=unexpected
|
|
|
|
exitcodes=0
|
|
|
|
|
|
|
|
|
2022-06-30 14:58:12 +03:00
|
|
|
{% for worker in workers %}
|
2022-06-27 13:43:20 +03:00
|
|
|
[program:synapse_{{ worker.name }}]
|
|
|
|
command=/usr/local/bin/prefix-log /usr/local/bin/python -m {{ worker.app }}
|
|
|
|
--config-path="{{ main_config_path }}"
|
|
|
|
--config-path=/conf/workers/shared.yaml
|
|
|
|
--config-path=/conf/workers/{{ worker.name }}.yaml
|
|
|
|
autorestart=unexpected
|
|
|
|
priority=500
|
|
|
|
exitcodes=0
|
|
|
|
stdout_logfile=/dev/stdout
|
|
|
|
stdout_logfile_maxbytes=0
|
|
|
|
stderr_logfile=/dev/stderr
|
|
|
|
stderr_logfile_maxbytes=0
|
|
|
|
|
2022-06-30 14:58:12 +03:00
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|