forked from 0x2620/pandora
fix permissions in vm build script, add systemd service files, support debian/systemd in vm build script
This commit is contained in:
parent
cf862fc7d6
commit
608745e396
6 changed files with 143 additions and 11 deletions
19
etc/systemd/pandora-cron.service
Normal file
19
etc/systemd/pandora-cron.service
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[Unit]
|
||||
Description=pandora cron daemon
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
User=pandora
|
||||
Group=pandora
|
||||
PIDFile=/run/pandora/cron.pid
|
||||
WorkingDirectory=/srv/pandora/pandora
|
||||
StandardOutput=syslog
|
||||
StandardError=syslog
|
||||
ExecStart=/srv/pandora/bin/python /srv/pandora/pandora/manage.py \
|
||||
celerybeat -s /run/pandora/celerybeat-schedule \
|
||||
--pidfile /run/pandora/cron.pid \
|
||||
-l INFO
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
21
etc/systemd/pandora-encoding.service
Normal file
21
etc/systemd/pandora-encoding.service
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
[Unit]
|
||||
Description=pandora encoding daemon
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
User=pandora
|
||||
Group=pandora
|
||||
PIDFile=/run/pandora/encoding.pid
|
||||
WorkingDirectory=/srv/pandora/pandora
|
||||
StandardOutput=syslog
|
||||
StandardError=syslog
|
||||
ExecStart=/srv/pandora/bin/python /srv/pandora/pandora/manage.py \
|
||||
celeryd \
|
||||
-Q encoding -n pandora-encoding \
|
||||
--pidfile /run/pandora/encoding.pid \
|
||||
-l INFO
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
21
etc/systemd/pandora-tasks.service
Normal file
21
etc/systemd/pandora-tasks.service
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
[Unit]
|
||||
Description=pandora tasks daemon
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
User=pandora
|
||||
Group=pandora
|
||||
PIDFile=/run/pandora/tasks.pid
|
||||
WorkingDirectory=/srv/pandora/pandora
|
||||
StandardOutput=syslog
|
||||
StandardError=syslog
|
||||
ExecStart=/srv/pandora/bin/python /srv/pandora/pandora/manage.py \
|
||||
celeryd \
|
||||
-Q default,celery -n pandora-default \
|
||||
--pidfile /run/pandora/tasks.pid \
|
||||
-l INFO
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
24
etc/systemd/pandora.service
Normal file
24
etc/systemd/pandora.service
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[Unit]
|
||||
Description=pandora daemon
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
User=pandora
|
||||
Group=pandora
|
||||
PIDFile=/run/pandora/pandora.pid
|
||||
WorkingDirectory=/srv/pandora/pandora
|
||||
StandardOutput=syslog
|
||||
StandardError=syslog
|
||||
ExecStartPre=/srv/pandora/pandora/manage.py compile_pyc
|
||||
ExecStart=/srv/pandora/bin/gunicorn_django \
|
||||
-p /run/pandora/pandora.pid \
|
||||
--bind 127.0.0.1:2620 \
|
||||
--timeout 90 \
|
||||
--max-requests 1000 \
|
||||
--log-level info \
|
||||
--workers 5
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue