From 60df8ab8e75ae44569a6d5b990b83019b910d910 Mon Sep 17 00:00:00 2001 From: Ville Rantanen Date: Wed, 24 Jan 2018 14:18:41 +0200 Subject: [PATCH] include config --- code/start_app.py | 11 +++++++++++ data/config.json | 8 ++++++++ 2 files changed, 19 insertions(+) create mode 100644 code/start_app.py create mode 100644 data/config.json diff --git a/code/start_app.py b/code/start_app.py new file mode 100644 index 0000000..5d66ee8 --- /dev/null +++ b/code/start_app.py @@ -0,0 +1,11 @@ +import subprocess,json + +config = json.load(open('data/config.json','rt')) + +subprocess.call([ + 'gunicorn', + '-b','0.0.0.0:80', + '--timeout',str(config['timeout']), + '-w',str(config['workers']), + 'app:app' +]) diff --git a/data/config.json b/data/config.json new file mode 100644 index 0000000..340c7da --- /dev/null +++ b/data/config.json @@ -0,0 +1,8 @@ +{ + "workers": 8, + "timeout": 3600, + "uid": 1000, + "data_folder": "data", + "shares_file": "data/shares.json", + "date_format": "%Y-%m-%d %H:%M" +}