KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
First of all I have many Django instances setup and running like this. In each project I have a script.sh shell script that starts gunicorn etc.: #!/bin/bash set -e LOGFILE=/var/log/gunicorn/app_name.log LOGDIR=$(dirname $LOGFILE) NUM_WORKERS=3 # user/group to run as USER=root GROUP=root PORT=8060 IP=127.0.0.1 cd /var/www/webapps/app_name source ../bin/activate test -d $LOGDIR || mkdir -p $LOGDIR exec /var/www/webapps/bin/gunicorn_django -b $IP:$PORT -w $NUM_WORKERS \ --user=$USER --group=$GROUP --log-level=debug --log-file=$LOGFILE 2>>$LOGFILE When running this script from the command line with bash script.sh , the site works perfectly, so Nginx is setup right. As soon as I use upstart with service app_name start the app starts and then just stops. It does not even write to the log file. This is the app_name.conf file in /etc/init/app_name.conf : description "Test Django instance" start on runlevel [2345] stop on runlevel [06] respawn respawn limit 10 5 exec /var/www/webapps/app_name/script.sh So what is the problem here? Cause running from command line works, but doing trough upstart does not. And I dont know where to see whats wrong?
Tags (comma-separated)
Save Edits
Cancel