Skip to content

Instantly share code, notes, and snippets.

@codeAshu
Created July 2, 2017 12:27
Show Gist options
  • Save codeAshu/3b71b689041654d323a652d2f520fabc to your computer and use it in GitHub Desktop.
Save codeAshu/3b71b689041654d323a652d2f520fabc to your computer and use it in GitHub Desktop.
#!/bin/bash
kill -9 $(ps aux | grep 'uwsgi' | awk '{print $2}')
source /home/ubuntu/.env/myappenv/bin/activate
cd /home/ubuntu/myapp
kill -9 $(ps -aux | grep 'worker.py' | awk '{print $2}')
nohup redis-server &
nohup python -u worker.py > worker.out &
uwsgi --socket :8881 --plugin python --wsgi-file main.py --callable app --buffer-size 32768 --process 4 --logto /home/ubuntu/myapp/log/myapp.log &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment