16 ms·
Deploying Django on Heroku
- dave_sullivan 15y agoThat's really cool, thanks for posting. What's it using to serve the pages though, it looks like the django test server? Btw, not a ror dev (at all) but what does that typically use as a web server and how is heroku doing it? (not apache?)
- deleted 15y ago[deleted]
- maaku 15y agoThis is running via runserver, right? Don't use this for production. There are some nice pure-Python web servers though. To someone who knows more about Heroku's stack, if I replace “manage.py runserver” with, say, CherryPy, would there be any Heroku-specific performance issues to consider?
- lamby 15y ago(I would use gunicorn)
- kylefox 15y agoGood plan. From the Django documentation: "DO NOT USE THIS SERVER IN A PRODUCTION SETTING." (https://docs.djangoproject.com/en/1.3/ref/django-admin/#runserver-port-or-address-port https://docs.djangoproject.com/en/1.3/ref/django-admin/#runs... )
- ymir 15y agoWe made a nice recipe for production-ready Djanogo setup on Heroku http://www.askthepony.com/blog/2011/07/getting-django-on-heroku-prancing-8-times-faster/ http://www.askthepony.com/blog/2011/07/getting-django-on-her...
- MostAwesomeDude 15y agoI have done this with Twisted and have yet to see any problems. In your requirements.txt, add "Twisted". In your procfile, try something like: web: bin/python ./twistd -n web --port=$PORT --wsgi fully.qualified.app.name
- abhiomkar 15y agogunicorn server will work, this makes it production ready. Please replace runserver line with the below line in your Procfile web: bin/gunicorn_django --workers=4 --bind=0.0.0.0:$PORT django_project/settings.py
- zachwill 15y agoJust a quick heads up, I made a Flask template with Gevent to get up and running on Heroku: https://github.com/zachwill/flask_heroku https://github.com/zachwill/flask_heroku
- jpadilla 15y agoCheck this one out http://elweb.co/programacion/how-to-host-django-apps-on-heroku/ http://elweb.co/programacion/how-to-host-django-apps-on-hero...
- CoffeeDregs 15y agoQuestion: is this a hack to get some Python on Heroku or is it a valuable potential Django server? When I did Rails work, I loved Heroku. Now that I do Django work, I love ... well ... my own server. I'm sure I should check out the various like-Heroku-but-Django services out there, but I'm used to Heroku. Valuable? Or move along nothing to see here? Note: I see maaku's note about runserver, but I can hope can't I? Note 2: as this comment lingers, can anyone recommend a living, non-invite-only Django hosting service?
- MostAwesomeDude 15y agoIt's not a hack. Heroku's Cedar stack supports Python applications, first-class.
- CoffeeDregs 15y agoPython and/or Django aren't listed anywhere here: http://devcenter.heroku.com/articles/cedar http://devcenter.heroku.com/articles/cedar Suggests that Python/Django aren't so much first-class as incidental...
- abhiomkar 15y agopython apps are not officially supported by Heroku, Looks like python app support is added for Facebook Apps to run on Heroku? (http://www.heroku.com/facebook http://www.heroku.com/facebook) However, heroku.com says "Run Anything" :)
- paltman 15y agoGondor (https://gondor.io https://gondor.io) now has open sign up.
- niels 15y agoI've used a couple of the django-heroku clones, Djangy, Gondor and Ep.io. Djangy is no more. Gondor is nice but lacking critical features (background jobs, caching... etc.), and generally seems like a sideshow to their consulting business. ep.io is ahead in features and quality so far. I have not tried DjangoZoom, as I was a little bit annoyed that they required me to pay for beeing in their beta test program.
- astrofinch 15y agoOr you could go for https://gondor.io/ https://gondor.io/, a much more featureful solution by the makers of Pinax.
- joelhaasnoot 15y agoI've been using this for my staging environment. Works well! Has support for the essential django tools (PIL, South, collectstatic), etc.