在 Cedar、Heroku 上使用您自己的二进制文件提供服务
我正在尝试在 Heroku 上运行 Haskell。我编译了一个二进制app
并创建了一个Procfile
,如下所示:
web: ./app +RTS -N4
当我将其推送到Heroku时,它说:
-----> Heroku receiving push
! Heroku push rejected, no Cedar-supported app detected
现在我认为,Cedar不支持滚动您的二进制文件。有什么办法可以部署吗?
我看过https://github.com/mwotton/heroku_haskell_demo。这家伙似乎已经部署到 Heroku,但它不再起作用了。 Heroku 看到 Gemfile
并认为它是一个 Ruby 应用程序,并使用 Bundle install
运行其默认 Procfile,这显然失败了。
I am trying to run Haskell on Heroku. I have compiled a binary app
and created a Procfile
as follows:
web: ./app +RTS -N4
When I push it to Heroku, it says:
-----> Heroku receiving push
! Heroku push rejected, no Cedar-supported app detected
Now I think, Cedar does not support rolling in your binaries. Is there any way to deploy it?
I have seen https://github.com/mwotton/heroku_haskell_demo. This guy seems to have deployed to Heroku but, it no longer works. Heroku sees the Gemfile
s and thinks that it is a Ruby app and runs its default Procfile with Bundle install
which fails obviously.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以将 Haskell 应用程序部署为 Node.js。
Cedar stack 通过 package.json 文件的存在将应用程序识别为 Node.js。
因此,您应该创建一个 package.conf,如下所示:
package.json:
You can deploy your Haskell app as Node.js.
Cedar stack recognizes an app as Node.js by the existence of a package.json file.
So, you should create a package.conf as follows:
package.json:
我知道您已经解决了它,但我遇到了几乎相同的问题,但还有一个原因,因此这可能对其他人有帮助:
请确保使用
heroku create --stack cedar
而不是heroku 创建
。I know that you've already solved it, but I had pretty much the same problem with an additional cause, so this might help others:
Make sure to use
heroku create --stack cedar
rather thanheroku create
.