forked from ScoDoc/DocScoDoc
27 lines
697 B
Desktop File
27 lines
697 B
Desktop File
# 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
|
|
#Environment=FLASK_ENV=production
|
|
ExecStart=/opt/scodoc/venv/bin/gunicorn -b localhost:8000 -w 4 --timeout 600 scodoc:app
|
|
Restart=always
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target |