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