Setting up Django with gunicorn, nginx, supervisord and fabric
kencochrane.net
kencochrane.net
I really liked Django but the deployment process was very frustrating. I started with Apache/mod_wsgi which ate up a bunch of time but I eventually punted and went to gunicorn and nginx which worked pretty well. I also ran down a bit of a blind alley with buildout but eventually saw the light and started using virtualenv + pip. I used fabric to automate deployment and Ubuntu's upstart for process management.
In the end I got the process working pretty well, save a few issues, but it left a bad taste in my mouth. There was a period of time where I was waiting to get into the Djangy beta, and I was very optimistic that that would fill the gap for me, but that company eventually went away, helping to motivate me to look into Rails so that I could deploy on Heroku. (Note: There seem to be a couple of viable Django-PaaS options today, including Gondor.io and DotCloud.)
I'm finishing up my first Rails 3 project now and I love it, especially the Heroku-based deployment model.
P.S. The other motivator for me to jump to Rails was first-class support for HAML and SASS. I tried all the Python/Django hacks and got them working, but it was clunky as hell. There have been notable complaints of late about how fast Rails is changing, but I think the amount of innovation that has been going on in and around the framework is amazing.
Here's my sample Supervisord conf file for gunicorn:
[program:gunicorn]
directory=/home/sclay/newsblur
command=gunicorn_django -c config/gunicorn_conf.py
user=sclay
autostart=true
autorestart=true
#redirect_stderr=True
priority=991
stopsignal=HUP
Hope that helps.