Created
February 27, 2012 19:42
-
-
Save asmallteapot/1926548 to your computer and use it in GitHub Desktop.
Upstart configuration for uWSGI serving a Django project to a socket. I’m using this with Nginx on Ubuntu 11.10 in production for a smallish RESTful API.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!upstart | |
| description "uWSGI server for example.com" | |
| start on startup | |
| stop on shutdown | |
| script | |
| exec sudo -u www-data /usr/bin/uwsgi --plugins http,python \ | |
| --chmod-socket --socket /tmp/example.sock \ | |
| --wsgi-file /srv/www/example.com/example/config.wsgi \ | |
| --callable app \ | |
| --processes 10 \ | |
| --harakiri 15 \ | |
| --logto /srv/www/example.com/logs/uwsgi.log | |
| end script | |
| post-stop script | |
| rm /tmp/example.sock | |
| end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment