Commit 80c0784b authored by lukas-raspberrypi's avatar lukas-raspberrypi
Browse files

systemd services

parent 76ac7dd1
......@@ -13,7 +13,7 @@ app.config['SECRET_KEY'] = os.getenv('SECRET_KEY') or 'jonas ist ein kek'
app.config['MEDIA_LOCATION'] = os.getenv('MEDIA_LOCATION') or os.path.join(datadir, 'media')
app.config['SQLALCHEMY_DATABASE_URI'] = os.getenv('DATABASE_URI') or 'sqlite:///' + os.path.join(datadir, 'home.db')
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
app.config['MAX_CONTENT_LENGTH'] = 5 * 1024 * 1024 # 5 MB
app.config['MAX_CONTENT_LENGTH'] = 500 * 1024 * 1024 # 5 MB
app.config['REDIS_URI'] = os.getenv('REDIS_URI') or 'redis://'
app.jinja_env.globals['len'] = len
......
[Unit]
Description=Chiefsend rq worker
[Service]
Type=simple
WorkingDirectory=/home/pi/chiefsend
ExecStart=/home/pi/chiefsend/venv/bin/rq worker --with-scheduler
Restart=on-failure
[Install]
WantedBy=default.target
[Unit]
Description=Chiefsend Web Service gunicorn Worker
[Service]
Type=simple
WorkingDirectory=/home/pi/chiefsend
ExecStart=/home/pi/chiefsend/venv/bin/gunicorn -b :5000 --workers=3 --timeout=90 --graceful-timeout=30 --log-level=DEBUG --access-logfile - --error-logfile - chiefsend:app
Restart=on-failure
[Install]
WantedBy=default.target
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment