Skip to content

Instantly share code, notes, and snippets.

@barrysteyn
Created January 6, 2013 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barrysteyn/4469288 to your computer and use it in GitHub Desktop.
Save barrysteyn/4469288 to your computer and use it in GitHub Desktop.
Using Python with a VirtualEnv in Upstart
start on runlevel [2345]
stop on runlevel [06]
setuid devuser
setgid devuser
exec /usr/local/bin/uwsgi --master --socket 127.0.0.1:3031 --pythonpath "/home/dev/python-script" --file "/home/dev/python-script/script.py" --callable app --processes 20 --virtualenv "/home/dev/.virtualenvs/python-script" --enable-threads
start on startup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment