按照"在heroku/ceadar上开始使用Django"这封信的指南,最后设法解决了部署应用程序的一些问题
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
Run Code Online (Sandbox Code Playgroud)
指南说网络服务器应该启动.但是heroku ps显示没有进程,显然页面没有加载.
heroku日志的尾部:
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
------- ----- -------
Run Code Online (Sandbox Code Playgroud)
我应该明确地启动网络服务器吗?我在做错了吗?
我用于我的django/heroku实例的Procfile如下所示:
web: python hellodjango/manage.py runserver "0.0.0.0:$PORT"
Run Code Online (Sandbox Code Playgroud)
如前所述,如果您没有Procfile并且您正在使用默认的Web服务器,那么它基本上会执行上述操作 - 但请尝试显式.您可以尝试从heroku控制台运行它,以查看它获得的错误(如果有):
heroku run python hellodjango/manage.py runserver
Run Code Online (Sandbox Code Playgroud)
关键在这里:
Procfile declares types -> (none)
Run Code Online (Sandbox Code Playgroud)
Heroku 不知道如何运行您的应用程序。我想python hellodjango/manage.py runserver你在本地工作?如果是这样,Heroku 应该能够识别它。
requirements.txt另请检查您的存储库根目录中是否有,以及settings.py您的项目子目录之一中是否有 。
| 归档时间: |
|
| 查看次数: |
7184 次 |
| 最近记录: |