尝试在 Heroku 上部署我的 django 应用程序时,我遵循了官方指南并设法让示例 'hellodjango.app' 工作。
现在下一步是部署我自己的项目,但这样做会在 Heroku 上显示以下错误:
日志文件:
2016-01-11T06:25:15.235676+00:00 app[web.1]: Performing system checks...
2016-01-11T06:25:15.235697+00:00 app[web.1]: 2016-01-11T06:25:15.235697+00:00 app[web.1]:
2016-01-11T06:25:15.244321+00:00 app[web.1]: System check identified no issues (0 silenced).
2016-01-11T06:25:15.276207+00:00 app[web.1]: January 11, 2016 - 06:25:15
2016-01-11T06:25:15.276211+00:00 app[web.1]: Django version 1.8, using settings 'bittania.settings'
2016-01-11T06:25:15.276212+00:00 app[web.1]: Starting development server at http://127.0.0.1:8000/
2016-01-11T06:25:15.276213+00:00 app[web.1]: Quit the server with CONTROL-C.
2016-01-11T06:25:42.412857+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path="/" host=shjdhjsd.herokuapp.com request_id=781298dc-bc3d-4ad8-8da8-1a49ffb7d983 fwd="**MYIPADDRESS**" dyno= connect= service= status=503 bytes=
2016-01-11T06:26:12.694810+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2016-01-11T06:26:12.694810+00:00 heroku[web.1]: Stopping process with SIGKILL
2016-01-11T06:26:13.522957+00:00 heroku[web.1]: State changed from starting to crashed
2016-01-11T06:26:13.509271+00:00 heroku[web.1]: Process exited with status 137
我已经设置了一个 Procfile、gitignore 和 wsgi.py
我究竟做错了什么?
编辑
将 Procfile 更改为“`web: gunicorn sitename.wsgi --log-file -- 。是的,这适用于新应用程序,它向我显示 Django 欢迎屏幕 __> pure-depths-4933.herokuapp.com。这样做是为了我的但是,旧项目给了我与以前相同的错误。