Browse Source

Adding a sample systemd unit file, not the recommended way to run this though

Joe Ceresini 7 years ago
parent
commit
c9581fd03f
1 changed files with 13 additions and 0 deletions
  1. 13 0
      python/systemd_pytestapp.service

+ 13 - 0
python/systemd_pytestapp.service

@@ -0,0 +1,13 @@
+[Unit]
+Description=pytestapp
+After=network.target
+
+[Service]
+User=[runuser]
+Group=[rungroup]
+ExecStart=/bin/bash -c "source [path/to/virtualenv]/bin/activate ; export FLASK_APP=pytestapp ; flask run --host=0.0.0.0"
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
+