From 5ed9a0bd7c307f0e0afdf0ef8d5ca296f9629f4d Mon Sep 17 00:00:00 2001 From: Fergal Moran Date: Sun, 8 Nov 2015 22:41:43 +0000 Subject: [PATCH] Moved to gunicorn --- run_web.sh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/run_web.sh b/run_web.sh index 15aca67..a2db8f4 100755 --- a/run_web.sh +++ b/run_web.sh @@ -1,3 +1,15 @@ -#!/bin/sh -su -m djworker -c "python manage.py migrate" -su -m djworker -c "python manage.py runserver_plus 0.0.0.0:8001" +#!/bin/bash +python manage.py migrate + +touch /srv/logs/gunicorn.log +touch /srv/logs/access.log +tail -n 0 -f /srv/logs/*.log & + +echo "Starting gunicorn" +exec gunicorn dss.wsgi:application \ + --bind 0.0.0.0:8001 + --workers 4 \ + --log-level=info \ + --log-file=/srv/logs/gunicorn.log \ + --access-logfile=/srv/logs/access.log \ + "$@" \ No newline at end of file