changeset 100:bf1a998fff48 1.6.0

Add service file for running ODFCast via systemd.
author Bernhard Herzog <bh@intevation.de>
date Tue, 26 Jun 2018 21:48:01 +0200
parents 349d49bb69f4
children 779abdc03d67
files odfcast.service
diffstat 1 files changed, 23 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/odfcast.service	Tue Jun 26 21:48:01 2018 +0200
@@ -0,0 +1,23 @@
+[Unit]
+Description=ODFCast
+Wants=network.target
+
+[Service]
+User=odfcast
+Group=odfcast
+Restart=always
+WorkingDirectory=/home/odfcast/odfcast/releases/current
+
+# === Flask ===
+# ExecStart=/home/odfcast/odfcast/env/bin/python3 main.py
+# === eventlet ===
+# ExecStart=/usr/bin/gunicorn3 --bind 127.0.0.1:5000 --access-logfile - \
+#     --pythonpath ../../env/lib/python3.5/site-packages/ \
+#     --workers 3 --worker-class eventlet wsgi
+# === gthread ===
+ExecStart=/usr/bin/gunicorn3 --bind 127.0.0.1:5000 --access-logfile - \
+    --pythonpath ../../env/lib/python3.5/site-packages/ \
+    --workers 3 --threads 4 --worker-class gthread odfcast:app
+
+[Install]
+WantedBy=multi-user.target
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)