mirror of
https://github.com/famedly/ansible-collection-matrix
synced 2024-12-14 05:02:27 +00:00
1985813915
Can deploy synapse workers and allow costum amounts of workers for each type. For documentation on how to use, see `roles/synapse/README.md`. In a docker deployment, each worker runs in their own docker container with respective listener configurations. Labels can be declared in `tasks/configure_workers.yml` for routing of requests. In systemd deployments, each worker runs in it's own systemd service, which are marked as being part of the main service, so restarting the main service will restart all the workers as well.
28 lines
800 B
Django/Jinja
28 lines
800 B
Django/Jinja
[Unit]
|
|
Description=Synapse Worker {{ item.name }}
|
|
AssertPathExists={{ matrix_synapse_base_path }}/{{ item.name }}.yaml
|
|
|
|
# This service should be restarted when the synapse service is restarted.
|
|
PartOf=matrix-synapse.service
|
|
ReloadPropagatedFrom=matrix-synapse.service
|
|
Before=matrix-synapse.service
|
|
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=notify
|
|
NotifyAccess=main
|
|
User=synapse
|
|
Group=synapse
|
|
WorkingDirectory={{ matrix_synapse_base_path }}
|
|
ExecStart={{ matrix_synapse_base_path }}/env/bin/python \
|
|
-m {{ item.app }} \
|
|
--config-path={{ matrix_synapse_base_path }}/homeserver.yaml \
|
|
--config-path={{ matrix_synapse_base_path }}/{{ item.name }}.yaml
|
|
ExecReload=/bin/kill -HUP $MAINPID
|
|
Restart=always
|
|
RestartSec=3
|
|
SyslogIdentifier=matrix-synapse-{{ item.name }}
|
|
|
|
[Install]
|
|
WantedBy=matrix-synapse.service
|