diff --git a/config/production/app.supervisor.conf b/config/production/app.supervisor.conf index 0070050..d3a2ea1 100644 --- a/config/production/app.supervisor.conf +++ b/config/production/app.supervisor.conf @@ -1,6 +1,6 @@ [program:gunicorn] -command = /home/app/virtualenv/bin/python2 /home/app/app/manage.py run_gunicorn --settings=herobrine.local_settings -w 2 -directory = /home/app/app +command = /home/app/server.sh +directory = /home/app user = app autostart = true autorestart = true diff --git a/config/production/deploy.py b/config/production/deploy.py index b1def81..78353e3 100644 --- a/config/production/deploy.py +++ b/config/production/deploy.py @@ -39,7 +39,10 @@ CONFIG_FILES = [ '%s/config/production/app.supervisor.conf' % GIT_DOWNLOAD_DIR, './conf/app.supervisor.conf' ), - + ( + '%s/config/production/server.sh' % GIT_DOWNLOAD_DIR, + './server.sh' + ), ] FIXTURES = [ diff --git a/config/server/server.sh b/config/server/server.sh new file mode 100755 index 0000000..a5042a7 --- /dev/null +++ b/config/server/server.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# CONFIG +WORKERS=2 +SETTINGS="herobrine.local_settings" + +# Get environment resources +source .bash_profile +source virtualenv/bin/activate + +# Start +gunicorn_django app --settings=$SETTINGS -w $WORKERS