Add systemd service files for bookwyrm front, worker and scheduler

This commit is contained in:
Codimp 2022-11-15 16:32:12 +01:00 committed by Codimp
parent 1e0cbe776c
commit 358a0e60a9
3 changed files with 42 additions and 0 deletions

View file

@ -0,0 +1,14 @@
[Unit]
Description=BookWyrm scheduler
After=network.target postgresql.service
[Service]
User=bookwyrm
Group=bookwyrm
WorkingDirectory=/opt/bookwyrm/
ExecStart=/opt/bookwyrm/venv/bin/celery -A celerywyrm beat -l INFO --scheduler django_celery_beat.schedulers:DatabaseScheduler
StandardOutput=journal
StandardError=inherit
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,14 @@
[Unit]
Description=BookWyrm worker
After=network.target postgresql.service redis.service
[Service]
User=bookwyrm
Group=bookwyrm
WorkingDirectory=/opt/bookwyrm/
ExecStart=/opt/bookwyrm/venv/bin/celery -A celerywyrm worker -l info -Q high_priority,medium_priority,low_priority
StandardOutput=journal
StandardError=inherit
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,14 @@
[Unit]
Description=BookWyrm
After=network.target postgresql.service
[Service]
User=bookwyrm
Group=bookwyrm
WorkingDirectory=/opt/bookwyrm/
ExecStart=/opt/bookwyrm/venv/bin/gunicorn bookwyrm.wsgi:application --bind 0.0.0.0:8000
StandardOutput=journal
StandardError=inherit
[Install]
WantedBy=multi-user.target