This commit is contained in:
creme 2021-08-01 14:34:00 +02:00
commit 490b2ecba7
No known key found for this signature in database
GPG key ID: C147C3B7FBDF08D0
39 changed files with 5451 additions and 0 deletions

View file

@ -0,0 +1,13 @@
[Unit]
Description=matrix-media-repo
After=network.target postgresql@11-main.service matrix-synapse.service
[Service]
Type=simple
User=matrix-media
WorkingDirectory=/opt/matrix-media-repo
ExecStart=/opt/matrix-media-repo/media_repo --config /etc/matrix-media-repo/media-repo.yaml
Restart=always
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,27 @@
[Unit]
Description=Synapse %i
AssertPathExists=/etc/matrix-synapse/workers/%i.yaml
# This service should be restarted when the synapse target is restarted.
PartOf=matrix-synapse.target
ReloadPropagatedFrom=matrix-synapse.target
# if this is started at the same time as the main, let the main process start
# first, to initialise the database schema.
After=matrix-synapse.service
[Service]
Type=notify
NotifyAccess=main
User=matrix-synapse
WorkingDirectory=/var/lib/matrix-synapse
EnvironmentFile=/etc/default/matrix-synapse
ExecStart=/opt/venvs/matrix-synapse/bin/python -m synapse.app.generic_worker --config-path=/etc/matrix-synapse/homeserver.yaml --config-path=/etc/matrix-synapse/conf.d/ --config-path=/etc/matrix-synapse/workers/%i.yaml
ExecStartPost=/bin/sh -c "echo $MAINPID > /etc/matrix-synapse/workers/%i.pid"
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
RestartSec=3
SyslogIdentifier=matrix-synapse-%i
[Install]
WantedBy=matrix-synapse.target

View file

@ -0,0 +1,22 @@
[Unit]
Description=Synapse master
# This service should be restarted when the synapse target is restarted.
PartOf=matrix-synapse.target
ReloadPropagatedFrom=matrix-synapse.target
[Service]
Type=notify
NotifyAccess=main
User=matrix-synapse
WorkingDirectory=/var/lib/matrix-synapse
EnvironmentFile=/etc/default/matrix-synapse
ExecStartPre=/opt/venvs/matrix-synapse/bin/python -m synapse.app.homeserver --config-path=/etc/matrix-synapse/homeserver.yaml --config-path=/etc/matrix-synapse/conf.d/ --generate-keys
ExecStart=/opt/venvs/matrix-synapse/bin/python -m synapse.app.homeserver --config-path=/etc/matrix-synapse/homeserver.yaml --config-path=/etc/matrix-synapse/conf.d/
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
RestartSec=3
SyslogIdentifier=matrix-synapse
[Install]
WantedBy=matrix-synapse.target

View file

@ -0,0 +1,8 @@
[Unit]
Description=Synapse parent target
After=network.target
Requires=postgresql@11-main.service
Requires=redis-server.service
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,13 @@
[Unit]
Description=matrix-synchrotron-balancer
After=network.target matrix-synapse.service
[Service]
Type=simple
User=synchrotron
WorkingDirectory=/opt/matrix-synchrotron-balancer
ExecStart=/opt/matrix-synchrotron-balancer/matrix-synchrotron-balancer
Restart=always
[Install]
WantedBy=multi-user.target