在 Cedar、Heroku 上使用您自己的二进制文件提供服务

发布于 2024-12-16 13:02:20 字数 595 浏览 7 评论 0原文

我正在尝试在 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 Gemfiles and thinks that it is a Ruby app and runs its default Procfile with Bundle install which fails obviously.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

烟花肆意 2024-12-23 13:02:20

您可以将 Haskell 应用程序部署为 Node.js。
Cedar stack 通过 package.json 文件的存在将应用程序识别为 Node.js。
因此,您应该创建一个 package.conf,如下所示:

package.json:

{ "name": "project-name", "version": "0.0.1", "dependencies": {} }

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:

{ "name": "project-name", "version": "0.0.1", "dependencies": {} }
孤云独去闲 2024-12-23 13:02:20

我知道您已经解决了它,但我遇到了几乎相同的问题,但还有一个原因,因此这可能对其他人有帮助:

请确保使用 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 than heroku create.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文