Django没有在heroku上运行 [英] Django not running on heroku
问题描述
跟随letter on Django on heroku / ceadar的信件指南,并且FINALLY设法解决了应用程序部署中的一些问题。
Followed the "Getting started with Django on heroku/ceadar" guide to the letter and FINALLY managed to sort out some issues on app deployment
Successfully installed django psycopg2
Cleaning up...
Discovering process types
Procfile declares types -> (none)
Compiled slug size is 8.0MB
Launching... done, v4
http://<watever>.herokuapp.com deployed to Heroku
,该指南说网络服务器应该是up。但是heroku ps显示没有进程,显然页面没有加载。
and the guide says the webserver should be up. but heroku ps shows no processes, and obviously the page doesnt load.
英雄日志的尾部:
2012-01-19T10:28:29+00:00 heroku[web.1]: State changed from created to down
2012-01-19T10:28:30+00:00 heroku[web.1]: State changed from down to created
2012-01-19T10:28:32+00:00 heroku[slugc]: Slug compilation finished
2012-01-19T10:30:32+00:00 heroku[router]: Error H99 (Platform error) -> GET <watever>
.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=
(venv) C:\Python27\facebook\venv\myapp>heroku ps
Process State Command
------- ----- -------
我应该明确地启动webserver吗? wat我做错了?
should I be starting the webserver explicitly? wat am I doing wrong?
推荐答案
我用于django / heroku实例的Procfile如下所示:
The Procfile I use for my django/heroku instance looks like this:
web: python hellodjango/manage.py runserver "0.0.0.0:$PORT"
如前所述,如果您没有Procfile,而您正在使用默认的网络服务器,那么它基本上会做上述的操作 - 但是尝试是明确的。您可以尝试从heroku控制台运行它,以查看它获得的(如果有的话)错误:
As has been mentioned, if you have no Procfile and you're using the default webserver, it will essentially do the above - but try being explicit. You can try running it from the heroku console instead, to see what (if any) errors it gets:
heroku run python hellodjango/manage.py runserver
这篇关于Django没有在heroku上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!