无法让 django heroku 正常运行。如何解决错误代码=H14 desc= "No web processes running"?



>我以前在 Heroku 上运行过这个应用程序,没有问题。但是自从我部署以来已经有大约 6 个月了,我也将计算机从 Linux 切换到 Windows 机器。

现在,当我部署时,部署成功,但服务不起作用。当我检查日志时,错误是: code=H14 desc="没有正在运行的 Web 进程">

我没有更改Procfile或要求.txt因为它一直在工作

要求.txt:

django
gunicorn
django-heroku
requests
djangorestframework
django-cors-headers
flask-sslify

文件:

release: python manage.py migrate
web: gunicorn findtheirgifts.wsgi --log-file -
wsgi.py
"""
WSGI config for findtheirgifts project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "findtheirgifts.settings")
application = get_wsgi_application()

我尝试了类似线程的一些建议 英雄 PS:重启 Heroku 构建包:清除 英雄库 PS:比例网络=1

这些似乎都没有改变任何事情。任何这方面的帮助将不胜感激!

如错误所示,您的应用未运行任何 Web 进程。 您可以使用以下命令从 CLI 查看所有正在运行的进程:

heroku ps -a <your app name>

并通过以下方式将您的 Web 进程扩展到 1:

heroku ps:scale web=1 -a <your app name>

这将启动应用的一个实例。 请参阅 Heroku 扩展文档。

原来在与我以前不同的目录中初始化了 heroku git 文件。导致应用找不到 Procfile。

最新更新