debian: add systemd service file (#16804)
This commit is contained in:
parent
b1ab8857d0
commit
cd140d19cc
|
@ -1,5 +1,6 @@
|
|||
usr/bin/manage.py /usr/lib/bijoe
|
||||
debian/bijoe-manage /usr/bin
|
||||
debian/bijoe.service /lib/systemd/system
|
||||
debian/settings.py /etc/bijoe
|
||||
debian/debian_config.py /usr/lib/bijoe
|
||||
debian/import-wcs-data.sh /usr/lib/bijoe
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
[Unit]
|
||||
Description=BiJoe
|
||||
After=network.target postgresql.service
|
||||
Wants=postgresql.service
|
||||
|
||||
[Service]
|
||||
Environment=BIJOE_SETTINGS_FILE=/usr/lib/%p/debian_config.py
|
||||
User=%p
|
||||
Group=%p
|
||||
ExecStartPre=/usr/bin/%p-manage migrate_schemas --noinput
|
||||
ExecStartPre=/usr/bin/%p-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=bijoe
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -2,7 +2,7 @@ Source: bijoe
|
|||
Section: python
|
||||
Priority: optional
|
||||
Maintainer: Benjamin Dauvergne <bdauvergne@entrouvert.com>
|
||||
Build-Depends: python-setuptools (>= 0.6b3), python-all (>= 2.6), debhelper (>= 7.4.3), python-django
|
||||
Build-Depends: python-setuptools (>= 0.6b3), python-all (>= 2.6), debhelper (>= 7.4.3), python-django, dh-systemd
|
||||
Standards-Version: 3.9.1
|
||||
Homepage: http://dev.entrouvert.org/projects/publik-bi/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
%:
|
||||
dh $@ --with python2
|
||||
dh $@ --with python2,systemd
|
||||
|
||||
override_dh_auto_install:
|
||||
dh_auto_install --with python2
|
||||
|
|
Loading…
Reference in New Issue