首页 > 解决方案 > python在本地运行良好,但不能在部署时与heroku一起运行

问题描述

在 heroku 上部署我的应用程序时遇到问题。我遵循了包括破折号教程和其他一些教程,但我仍然无法找出我做错了什么。一步一步我这样做:

  1. 在我的部署期间创建一个虚拟环境(使用 pipenv)
  2. 代码正确后,我按照应该完成的方式运行所有存储库(freeze >requirements.txt)并锁定我的要求等...
  3. 转移到 GIT,这是我没有看到任何人做的事情:我使用 LFS,因为我有一些来自 MATLAB 的代码,其中包含我的应用程序加载的大型数据集。
  4. 由于 lfs 的推送限制,我不使用 CLI 部署 heroku,所以我直接在 heroku 网站上链接我的 GIThub 存储库。
  5. 手动部署分支。

在此之后,heroku 很高兴并部署了我的应用程序,但是当我去 web 部署时,发生了一些错误。我试图更新 dinos,但它也不行。

如果有人想尝试部署它,这是我的 github 存储库:https://github.com/jmbruges/pcV3.git

这是我得到的日志错误:


019-05-08T08:17:37.782961+00:00 app[api]: Release v4 created by user javier.bruges@miun.se

2019-05-08T08:18:12.000000+00:00 app[api]: Build succeeded

2019-05-08T08:18:16.420769+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=pc-poincare-v3.herokuapp.com request_id=7e0bcbda-7e0a-4044-bad3-93b0c3032b2b fwd="193.10.110.224" dyno= connect= service= status=503 bytes= protocol=https

2019-05-08T08:20:14.395096+00:00 app[api]: Starting process with command `heroku ps:scale web=1` by user javier.bruges@miun.se

2019-05-08T08:20:26.411807+00:00 heroku[run.1831]: State changed from starting to up

2019-05-08T08:20:26.213707+00:00 heroku[run.1831]: Awaiting client

2019-05-08T08:20:26.516875+00:00 heroku[run.1831]: Starting process with command `heroku ps:scale web=1`

2019-05-08T08:20:30.827949+00:00 heroku[run.1831]: State changed from up to complete

2019-05-08T08:20:30.809159+00:00 heroku[run.1831]: Process exited with status 127

2019-05-08T08:58:32.680284+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=pc-poincare-v3.herokuapp.com request_id=03606f5e-1d4c-42a8-8f5e-a4ae7a051958 fwd="193.10.110.224" dyno= connect= service= status=503 bytes= protocol=https

Disconnected from log stream. There may be events happening that you do not see here! Attempting to reconnect...

标签: githerokuplotly-dashheroku-cli

解决方案


推荐阅读