【发布时间】:2016-04-15 10:11:04
【问题描述】:
尝试在 Heroku 上部署我的 django 应用程序,我关注了官方 guide 并设法让示例 '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。正在做所以对于我的旧项目,给我和以前一样的错误。
【问题讨论】:
-
你的 procfile 里有什么?
-
web: python manage.py runserver 8000 --noreload
-
请按照指南中的说明正确配置您的生产应用程序。
标签: django python-2.7 heroku web-deployment django-deployment