这些是我的构建日志。我的应用显示错误。
db.category.aggregate([
{
$lookup:
{
from: "subcategory",
localField: "_id",
foreignField: "categoryId",
as: "subcategory_items"
}
}
])
这是我的2020-08-09T20:25:31.000000+00:00 app[api]: Build succeeded
2020-08-09T20:25:33.898890+00:00 app[web.1]: bash: gunicorn: command not found
2020-08-09T20:25:33.955046+00:00 heroku[web.1]: Process exited with status 127
2020-08-09T20:25:33.996024+00:00 heroku[web.1]: State changed from starting to crashed
2020-08-09T20:25:42.118494+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=imagen-iitb.herokuapp.com request_id=b4762bc9-5410-443d-a630-d6ea43891527 fwd="103.240.97.60" dyno= connect= service= status=503 bytes= protocol=https
2020-08-09T20:25:48.479794+00:00 heroku[web.1]: State changed from crashed to starting
2020-08-09T20:25:53.064583+00:00 heroku[web.1]: Starting process with command `gunicorn run:app`
2020-08-09T20:25:55.106853+00:00 app[web.1]: bash: gunicorn: command not found
2020-08-09T20:25:55.149435+00:00 heroku[web.1]: Process exited with status 127
2020-08-09T20:25:55.179854+00:00 heroku[web.1]: State changed from starting to crashed
:
requirements.txt
如果您愿意,我可以提供我的代码。谢谢。
编辑:我的数据没有更新到我的SQL-Alchemy数据库文件(site.db)
我的应用程序在线访问:https://imagen-iitb.herokuapp.com/
答案 0 :(得分:2)
您忘记将gunicorn
库添加到您的requirements.txt
中。没有gunicorn,Web应用程序将无法启动,因为它是HTTP服务器。要解决此问题,只需在您的requirements.txt文件中添加gunicorn==20.0.4
,它就可以正常工作。