3 ms·
This 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
by maaku 15y ago
This 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