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

[Service]
Environment=DJANGO_SETTINGS_MODULE=eo_gestion.settings
Environment=BARBACOMPTA_SETTINGS_FILE=/etc/%p/config.py
Environment=LANG=C.UTF-8
User=%p
Group=%p
ExecStartPre=/usr/bin/barbacompta-manage migrate --noinput
ExecStartPre=/usr/bin/barbacompta-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=barbacompta
Type=notify
NotifyAccess=all

[Install]
WantedBy=multi-user.target
