welco/debian/welco.service

27 lines
665 B
Desktop File

[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 --verbosity 1
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