signal backend, app cleanup
This commit is contained in:
parent
4b157ed1d1
commit
6f18890739
43 changed files with 695 additions and 124 deletions
20
etc/systemd/system/phantasmobile-cron.service
Normal file
20
etc/systemd/system/phantasmobile-cron.service
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
[Unit]
|
||||
Description=phantasmobile cron
|
||||
After=phantasmobile-tasks.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
User=phantasmobile
|
||||
Group=phantasmobile
|
||||
PIDFile=/run/phantasmobile/phantasmobile-cron.pid
|
||||
WorkingDirectory=/srv/phantasmobile
|
||||
ExecStart=/srv/phantasmobile/venv/bin/celery \
|
||||
-A app beat -l info \
|
||||
--scheduler django_celery_beat.schedulers:DatabaseScheduler \
|
||||
--pidfile /run/phantasmobile/phantasmobile-cron.pid
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
15
etc/systemd/system/phantasmobile-signal-daemon.service
Normal file
15
etc/systemd/system/phantasmobile-signal-daemon.service
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
[Unit]
|
||||
Description=phantasmobile signal-daemon
|
||||
After=postgresql.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
User=phantasmobile
|
||||
Group=phantasmobile
|
||||
WorkingDirectory=/srv/phantasmobile
|
||||
ExecStart=/srv/phantasmobile/manage.py signal-daemon
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
19
etc/systemd/system/phantasmobile-tasks.service
Normal file
19
etc/systemd/system/phantasmobile-tasks.service
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[Unit]
|
||||
Description=phantasmobile tasks
|
||||
After=postgresql.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
User=phantasmobile
|
||||
Group=phantasmobile
|
||||
PIDFile=/run/phantasmobile/phantasmobile-tasks.pid
|
||||
WorkingDirectory=/srv/phantasmobile
|
||||
ExecStart=/srv/phantasmobile/venv/bin/celery \
|
||||
-A app worker -l info \
|
||||
-Q default -c 4 \
|
||||
--pidfile /run/phantasmobile/phantasmobile-tasks.pid
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
18
etc/systemd/system/phantasmobile.service
Normal file
18
etc/systemd/system/phantasmobile.service
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
[Unit]
|
||||
Description=phantasmobile daemon
|
||||
After=postgresql.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
User=phantasmobile
|
||||
Group=phantasmobile
|
||||
WorkingDirectory=/srv/phantasmobile
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
ExecStart=/srv/phantasmobile/venv/bin/gunicorn \
|
||||
app.wsgi:application \
|
||||
-c app/gunicorn_config.py \
|
||||
-p /run/phantasmobile/phantasmobile.pid
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
1
etc/tmpfiles.d/phantasmobile.conf
Normal file
1
etc/tmpfiles.d/phantasmobile.conf
Normal file
|
|
@ -0,0 +1 @@
|
|||
d /run/phantasmobile 0755 phantasmobile phantasmobile -
|
||||
Loading…
Add table
Add a link
Reference in a new issue