在 Heroku 上托管的 Django 站点 "No web processes runnng"

Django site hosting on Heroku "No web processes runnng"

所以我尝试将我的 Django 应用程序托管到 Heroku,一开始它成功了。然后我想添加一些发布命令,所以我这样做了:

release_commands.sh

python manage.py makemigrations
python manage.py migrate

在我的 Procfile 中:

release: bash ./release_commands.sh
web: gunicorn todo.wsgi --log-file - 

我的 Procfile 中的第二行没有改变,所以我猜错误一定是来自发布命令,但事实并非如此,因为在我的 heroku 日志中我有这个:

2021-02-17T19:41:31.675215+00:00 heroku[release.6232]: Process exited with status 0
2021-02-17T19:41:31.772693+00:00 heroku[release.6232]: State changed from up to complete
2021-02-17T19:41:34.021990+00:00 app[api]: Release v11 created by user georgi.hr.dim@gmail.com

这是错误信息:

2021-02-17T19:41:43.594322+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=POST path="/accounts/login/?next=/" host=essentialtodo.herokuapp.com request_id=5dce4816-6343-44c3-9c8f
-171e79379abc fwd="78.90.0.206" dyno= connect= service= status=503 bytes= protocol=https

刚刚发现问题所在。出于某种原因,在添加发布命令后,我的测功机被关闭了。要解决这个问题:转到你的 heroku 应用程序(在 heroku 网站上)-> 转到资源 -> 按测功机上的编辑按钮 -> 打开它并确认 .