debian: add systemd service file (#16465)

This commit is contained in:
Frédéric Péters 2017-05-15 22:56:00 +02:00
parent bac05b0cd7
commit 8a7b6773e5
2 changed files with 26 additions and 0 deletions

View File

@ -1,3 +1,4 @@
debian/combo.service /lib/systemd/system
debian/combo-manage /usr/bin
debian/settings.py /etc/combo
debian/debian_config.py /usr/lib/combo

25
debian/combo.service vendored Normal file
View File

@ -0,0 +1,25 @@
[Unit]
Description=Combo
After=network.target postgresql.service
Wants=postgresql.service
[Service]
Environment=COMBO_SETTINGS_FILE=/usr/lib/%p/debian_config.py
User=%p
Group=%p
ExecStartPre=/usr/bin/combo-manage migrate_schemas --noinput
ExecStartPre=/usr/bin/combo-manage collectstatic --noinput
ExecStart=/usr/bin/gunicorn \
--bind unix:/run/%p/%p.sock \
--worker-class=sync \
--workers 5 \
--timeout=30 \
--name %p \
%p.wsgi:application
ExecReload=/bin/kill -HUP $MAINPID
TimeoutStartSec=infinity
PrivateTmp=true
Restart=on-failure
[Install]
WantedBy=multi-user.target