debian: add systemd service file (#16800)
This commit is contained in:
parent
f04cb9ac70
commit
631a59403c
|
@ -1,3 +1,4 @@
|
|||
debian/welco-manage /usr/bin
|
||||
debian/settings.py /etc/welco
|
||||
debian/debian_config.py /usr/lib/welco
|
||||
debian/welco.service /lib/systemd/system
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
[Unit]
|
||||
Description=Welco
|
||||
After=network.target postgresql.service
|
||||
Wants=postgresql.service
|
||||
|
||||
[Service]
|
||||
Environment=WELCO_SETTINGS_FILE=/usr/lib/%p/debian_config.py
|
||||
User=%p
|
||||
Group=%p
|
||||
ExecStartPre=/usr/bin/welco-manage migrate_schemas --noinput
|
||||
ExecStartPre=/usr/bin/welco-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=0
|
||||
PrivateTmp=true
|
||||
Restart=on-failure
|
||||
RuntimeDirectory=welco
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue