2

I have seen very similar posts, that however did not help me to find a solution to my problem.

I am following step by step the guide to upload a project on heroku.

However when I type the command:

ps:scale web=1 

The result is:

no such process type web defined in Procfile

I have created a file "Procfile" being careful at the capitalization. but nothing.

What else can I do to solve this problem??

Thanks in advance.

4

2 回答 2

2

按照这个heroku procfile

我们必须在您的Procfile中定义 Web 进程类型,并确保准确命名Procfile,而不是其他任何东西。例如,Procfile.txt无效。例子:

一:蟒蛇:

网站:gunicorn gettingstarted.wsgi --log-file -

b: 字符串 MVC 休眠

网页:java $JAVA_OPTS -jar 目标/依赖/jetty-runner.jar --port $PORT 目标/*.war

这声明了一个进程类型web和运行它所需的命令。名称 web 在这里很重要。它声明此进程类型将附加到 Heroku 的 HTTP 路由堆栈,并在部署时接收 Web 流量。

Procfiles 可以包含其他进程类型。

工人:捆绑执行耙工作:工作

于 2015-08-04T11:30:50.067 回答
0

希望您在这段时间之后解决了您的问题,但以防万一您还没有...

当我的 Procfile 不存在(我正在移植到 Heroku 的 Web 应用程序)或与我尝试部署的 dyno 类型不匹配时,我遇到了这个问题(请参阅Heroku No such process type web defined在 procfile中有一个例子)。

你已经创建了你的 Procfile,但是你在里面放了什么?对于网站 Node.js 应用程序,您需要输入: web: node app.js (显然您将 app.js 替换为 index.js 或您的应用程序开始的任何位置)

有关 Procfiles(或 Node.js 以外的其他语言)的更多信息,请参阅https://devcenter.heroku.com/articles/procfile

于 2014-12-30T21:14:38.097 回答