Guest User

Untitled

a guest
Oct 23rd, 2019
89
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. NAME="vershinin"
  2. DJANGODIR=/home/max/vershinin
  3. SOCKFILE=/home/max/vershinin/vershinin2.sock
  4. USER=root
  5. GROUP=www-data
  6. NUM_WORKERS=3
  7. DJANGO_SETTINGS_MODULE=vershinin2.settings
  8. DJANGO_WSGI_MODULE=vershinin2.wsgi
  9.  
  10. cd $DJANGODIR
  11. source newenv/bin/activate
  12. export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
  13. export PYTHONPATH=$DJANGODIR:$PYTHONPATH
  14.  
  15. RUNDIR=$(dirname $SOCKFILE)
  16. test -d $RUNDIR || mkdir -p $RUNDIR
  17.  
  18. exec /home/max/vershinin/newenv/bin/gunicorn ${DJANGO_WSGI_MODULE}:application \
  19. --name $NAME \
  20. --workers $NUM_WORKERS \
  21. --user=$USER --group=$GROUP \
  22. --bind=unix:$SOCKFILE \
  23. --log-level=debug \
  24. --log-file=-
RAW Paste Data