简体   繁体   English

在procfile中没有定义此类进程类型的web

[英]Heroku No such process type web defined in procfile

When i'm runing heroku ps:scale web=1 , I'm getting below error. 当我运行heroku ps:scale web=1 ,出现以下错误。

Scaling dynos... failed 
      No such process type web defined in Procfile.

My Procfile contains below code. 我的Procfile包含以下代码。

worker: python vot.py

I also did heroku run bash and the Procfile is there and file name is also correct. 我也做了heroku run bash ,并且Procfile在那里,文件名也正确。

How could i solve this ? 我该如何解决?

Your heroku command has "web=1" but your Procfile has "worker". 您的heroku命令具有“ web = 1”,但您的Procfile具有“ worker”。 Try: 尝试:

heroku ps:scale worker=1

I dont see you define single process type "web" in your procfile. 我看不到您在procfile中定义单个进程类型“ web”。 Follow on this heroku procfile and define python procfile : 遵循此heroku procfile定义python procfile

web: gunicorn gettingstarted.wsgi --log-file - 网址:gunicorn Gettingstarted.wsgi --log文件-

This declares a single process type, web , and the command needed to run it. 这声明了一个单一的进程类型web和运行它所需的命令。 The name web is important here. 网站名称在这里很重要。 It declares that this process type will be attached to the HTTP routing stack of Heroku, and receive web traffic when deployed. 它声明此进程类型将附加到Heroku的HTTP路由堆栈中,并在部署时接收Web流量。

Procfiles can contain additional process types. Procfile可以包含其他进程类型。

worker: bundle exec rake jobs:work 工人:bunde exec rake工作:工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM