8

我正在尝试使用提供的文档在 Heoroku 上部署一个小型 django 应用程序。但是我的应用程序没有运行,当我查看 Heroku 上的日志时,问题似乎出在 procfile 上。这是procfile的内容。这是正确的语法吗?

web: gunicorn hashem3.wsgi -b 0.0.0.0:$PORT

这是 Heroku 日志显示的内容:

2012-07-21T03:02:58+00:00 heroku[slugc]: Slug compilation started
2012-07-21T03:04:28+00:00 heroku[api]: Add shared-database:5mb add-on by 
2012-07-21T03:04:28+00:00 heroku[api]: Release v2 created by xxx
2012-07-21T03:04:28+00:00 heroku[api]: Add PYTHONUNBUFFERED, PYTHONPATH, PATH, LD_LIBRARY_PATH, LANG, PYTHONHOME, LIBRARY_PATH, PYTHONHASHSEED config by xxx
2012-07-21T03:04:28+00:00 heroku[api]: Release v3 created by xxx
2012-07-21T03:04:28+00:00 heroku[api]: Release v4 created by xxx
2012-07-21T03:04:28+00:00 heroku[api]: Deploy 9805b83 by xxx
2012-07-21T03:04:29+00:00 heroku[slugc]: Slug compilation finished
2012-07-21T03:04:30+00:00 heroku[web.1]: Starting process with command `gunicorn hashem3.wsgi -b 0.0.0.0:8157`
2012-07-21T03:04:31+00:00 app[web.1]: bash: gunicorn: command not found
2012-07-21T03:04:32+00:00 heroku[web.1]: Process exited with status 127
2012-07-21T03:04:32+00:00 heroku[web.1]: State changed from starting to crashed
2012-07-21T03:04:32+00:00 heroku[web.1]: State changed from crashed to starting
2012-07-21T03:04:34+00:00 heroku[web.1]: Starting process with command `gunicorn hashem3.wsgi -b 0.0.0.0:54714`
2012-07-21T03:04:35+00:00 app[web.1]: bash: gunicorn: command not found
2012-07-21T03:04:36+00:00 heroku[web.1]: Process exited with status 127
2012-07-21T03:04:36+00:00 heroku[web.1]: State changed from starting to crashed
2012-07-21T03:05:17+00:00 heroku[router]: Error H10 (App crashed) -> GET floating-atoll-1969.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=
2012-07-21T03:05:18+00:00 heroku[router]: Error H10 (App crashed) -> GET floating-atoll-1969.herokuapp.com/favicon.ico dyno= queue= wait= service= status=503 by

测试=

4

2 回答 2

25

您忘记在 requirements.txt 文件中添加 guinicorn 作为依赖项。

于 2012-07-21T04:35:08.000 回答
0

在此处查看文档。特别是使用不同的 WSGI 服务器部分。

于 2012-07-21T04:22:33.500 回答