diff --git a/contrib/README.md b/contrib/README.md new file mode 100644 index 000000000..33b96832d --- /dev/null +++ b/contrib/README.md @@ -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. diff --git a/contrib/systemd/bookwyrm-scheduler.service b/contrib/systemd/bookwyrm-scheduler.service new file mode 100644 index 000000000..f3572f632 --- /dev/null +++ b/contrib/systemd/bookwyrm-scheduler.service @@ -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 diff --git a/contrib/systemd/bookwyrm-worker.service b/contrib/systemd/bookwyrm-worker.service new file mode 100644 index 000000000..7e25b0b17 --- /dev/null +++ b/contrib/systemd/bookwyrm-worker.service @@ -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 diff --git a/contrib/systemd/bookwyrm.service b/contrib/systemd/bookwyrm.service new file mode 100644 index 000000000..c7ebe26ec --- /dev/null +++ b/contrib/systemd/bookwyrm.service @@ -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