Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- NAME="wsgi" # Name of the application
- DJANGODIR=/home/idxtra/.projects/visitapp_server/src/visitapp # Django project directory
- SOCKFILE=/webapps/hello_django/run/gunicorn.sock # we will communicte using this unix socket
- USER=idxtra # the user to run as
- GROUP=webapps # the group to run as
- NUM_WORKERS=5 # how many worker processes should Gunicorn spawn
- DJANGO_SETTINGS_MODULE=visitapp.settings # which settings file should Django use
- DJANGO_WSGI_MODULE=wsgi.wsgi # WSGI module name
- TIMEOUT=100
- echo "Starting $NAME as `whoami`"
- # Activate the virtual environment
- cd $DJANGODIR
- source ../../env/bin/activate
- export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
- # export PYTHONPATH=$DJANGODIR:$PYTHONPATH
- # Create the run directory if it doesn't exist
- #RUNDIR=$(dirname $SOCKFILE)
- #test -d $RUNDIR || mkdir -p $RUNDIR
- # Start your Django Unicorn
- # Programs meant to be run under supervisor should not daemonize themselves (do not use --daemon)
- # Programs meant to be run under supervisor should not daemonize themselves (do not use --daemon)
- exec gunicorn wsgi \
- --name $NAME \
- --timeout $TIMEOUT \
- --workers $NUM_WORKERS \
- --log-level=debug \
- --log-file=-
- #!/bin/bash
- DJANGODIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
- echo $DJANGODIR
- DJANGO_SETTINGS_MODULE=visitapp.settings
- echo "Starting celery"
- cd $DJANGODIR
- source ../../env/bin/activate
- export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
- exec celery -A visitapp worker -l info --concurrency 6 -B
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement