From 4f407d1716bde8c0483cbd66acdd9f3ff47d3b6d Mon Sep 17 00:00:00 2001 From: Jared Kerim Date: Fri, 11 Aug 2017 17:18:02 -0400 Subject: [PATCH] Add uwsgi fixes #172 --- Makefile | 3 +++ app/requirements.txt | 1 + app/uwsgi.ini | 8 ++++++++ 3 files changed, 12 insertions(+) create mode 100644 app/uwsgi.ini diff --git a/Makefile b/Makefile index 5f95efaf9..50c246c31 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,9 @@ compose_build: build up: compose_build docker-compose up +uwsgi: compose_build + docker-compose run app sh -c "/app/bin/wait-for-it.sh db:5432 -- uwsgi --ini uwsgi.ini" + test: compose_build docker-compose run app sh -c "/app/bin/wait-for-it.sh db:5432 -- coverage run manage.py test;coverage report -m --fail-under=100" diff --git a/app/requirements.txt b/app/requirements.txt index 67d48bbc0..02dd3cea3 100644 --- a/app/requirements.txt +++ b/app/requirements.txt @@ -10,3 +10,4 @@ mock==2.0.0 psycopg2==2.6.2 python-decouple==3.0 raven==6.0.0 +uWSGI==2.0.15 diff --git a/app/uwsgi.ini b/app/uwsgi.ini new file mode 100644 index 000000000..4b5dcee8a --- /dev/null +++ b/app/uwsgi.ini @@ -0,0 +1,8 @@ +[uwsgi] +chdir=/app/ +http=0.0.0.0:7001 +module=experimenter.wsgi:application +master=True +pidfile=/tmp/project-master.pid +vacuum=True +max-requests=5000