mirror of
https://github.com/sossuOrkesteri/sossunVerkkosivut.git
synced 2026-10-12 19:23:37 +03:00
added systemd service file for server use
This commit is contained in:
@@ -0,0 +1,14 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Python flask app running the sossu main page.
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
# disables output buffering -> logging works correctly
|
||||||
|
Environment=PYTHONUNBUFFERED=1
|
||||||
|
Restart=on-failure
|
||||||
|
# checks network connectivity before launching
|
||||||
|
ExecStartPre=/bin/sh -c 'while ! ping -c1 1.1.1.1 -W.5; do sleep 1; done'
|
||||||
|
# executes the site
|
||||||
|
ExecStart=/root/sossunVerkkosivut/.venv/bin/python3 /root/sossunVerkkosivut/wsgi.py
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
Reference in New Issue
Block a user