ScoDoc/tools/etc/scodoc9.service

26 lines
663 B
SYSTEMD
Raw Normal View History

# ScoDoc 9 systemd service
# Flask based
# a priori on ne dépend plus de postgresql ? XXX
# inspiré par https://blog.miguelgrinberg.com/post/running-a-flask-application-as-a-service-with-systemd
#
# A copier dans /etc/systemd/system/scodoc9.service
# puis
# sudo systemctl daemon-reload
# sudo systemctl start scodoc9
#
[Unit]
Description=ScoDoc 9 service
After=network.target
#Requires={{postgresql}}
#PartOf={{postgresql}}
#StartLimitIntervalSec=0
[Service]
User=scodoc
Group=scodoc
WorkingDirectory=/opt/scodoc
2021-09-08 00:13:41 +02:00
ExecStart=/opt/scodoc/venv/bin/gunicorn -b localhost:8000 -w 4 --timeout 600 scodoc:app
Restart=always
[Install]
WantedBy=multi-user.target