# HG changeset patch # User Bernhard Herzog # Date 1530042481 -7200 # Node ID bf1a998fff4882ab48e17651470a4b497d94fb6e # Parent 349d49bb69f4dad20cd7b339979efde51b250f13 Add service file for running ODFCast via systemd. diff -r 349d49bb69f4 -r bf1a998fff48 odfcast.service --- /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