[Unit]
Description=Docbow
After=network.target postgresql.service
Wants=postgresql.service

[Service]
Environment=DOCBOW_SETTINGS_FILE=/usr/lib/%p/debian_config.py
Environment=LANG=fr_FR.UTF-8
Environment=LC_ALL=fr_FR.UTF-8
User=%p
Group=%p
ExecStartPre=/usr/bin/docbow-manage migrate --noinput --verbosity 1
ExecStartPre=/usr/bin/docbow-manage collectstatic --noinput
ExecStart=/usr/bin/uwsgi --ini /etc/%p/uwsgi.ini
ExecReload=/bin/kill -HUP $MAINPID
KillSignal=SIGQUIT
TimeoutStartSec=0
PrivateTmp=true
Restart=on-failure
RuntimeDirectory=docbow
Type=notify
NotifyAccess=all

[Install]
WantedBy=multi-user.target
