From fea757fd88946529d2a7725f34ccde66b533dd0f Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Mon, 2 Jun 2014 13:57:14 -0400 Subject: [PATCH] Add gunicorn support. --- gunicorn.cfg | 10 ++++++++++ run.sh | 1 + setup.py | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 gunicorn.cfg create mode 100755 run.sh diff --git a/gunicorn.cfg b/gunicorn.cfg new file mode 100644 index 0000000..7c1bca5 --- /dev/null +++ b/gunicorn.cfg @@ -0,0 +1,10 @@ +# Configuration file for Gunicorn +# http://docs.gunicorn.org/en/latest/configure.html + +bind = ["0.0.0.0:5000"] +daemon = True +workers = 4 + +accesslog = "logs/access.log" +errorlog = "logs/error.log" +loglevel = "info" diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..69be6a8 --- /dev/null +++ b/run.sh @@ -0,0 +1 @@ +gunicorn -c gunicorn.cfg app:app diff --git a/setup.py b/setup.py index 5ab7a7c..f268991 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( version = "0.1.dev", packages = find_packages(), install_requires = [ - "Flask>=0.10.1", "pygments>=1.6", "requests>=2.2.0", + "Flask>=0.10.1", "gunicorn>=18.0", "pygments>=1.6", "requests>=2.2.0", "beautifulsoup4>=3.2.1", "oursql>=0.9.3.1", "mmh3>=2.3", "python-dateutil>=2.2"], author = "Benjamin Attal, Ben Kurtovic, Severyn Kozak",