Merge pull request #2373 from codeurimpulsif/contrib-system

Add contrib directory with systemd service files for front, worker and scheduler
This commit is contained in:
Mouse Reeve 2023-01-09 20:26:02 -08:00 committed by GitHub
commit 917569ef0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 47 additions and 0 deletions

5
contrib/README.md Normal file
View file

@ -0,0 +1,5 @@
# Contrib
This directory contain some scripts, configuration files and other useful tools around BookWyrm.
These tools are not necessary for the proper functioning of BookWyrm but provide a helpful leg-up for integration with some third-party or to nicely fit BookWyrm into other environments.

View file

@ -0,0 +1,14 @@
[Unit]
Description=BookWyrm scheduler
After=network.target postgresql.service redis.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 redis.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