Created
August 1, 2014 19:54
-
-
Save steve-chavez/d46c5ad8ed73c0a884dd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
LOGFILE=/usr/local/virtualenvs/ks_env/ks.webapp2/kswebapp2.log | |
ERRORFILE=/usr/local/virtualenvs/ks_env/ks.webapp2/error.log | |
LOGDIR=$(dirname $LOGFILE) | |
NUM_WORKERS=3 | |
#The below address:port info will be used later to configure Nginx with Gunicorn | |
ADDRESS=127.0.0.1:8002 | |
# user/group to run as | |
#USER=your_unix_user | |
#GROUP=your_unix_group | |
cd /usr/local/virtualenvs/ks_env/ks.webapp2/ | |
source ../bin/activate | |
test -d $LOGDIR || mkdir -p $LOGDIR | |
exec ../bin/gunicorn_django -w $NUM_WORKERS --bind=$ADDRESS \ | |
--log-level=debug \ | |
--log-file=$LOGFILE 2>>$LOGFILE 1>>$ERRORFILE & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment