将 Gollum wiki 部署到 Heroku

发布于 2024-09-30 01:35:14 字数 613 浏览 5 评论 0原文

Gollum 是“一个简单的、由 Git 驱动的 wiki,具有出色的 API 和本地前端。”

它托管在 GitHub 上: http://github.com/github/gollum

它似乎是一个简单的 Sinatra app,因此,看起来应该很容易部署到 Heroku。我似乎无法让它发挥作用。主要是因为我对 Rake 和 config.ru 文件几乎一无所知。

是否有可能将 Gollum wiki 部署到 Heroku?如果是这样,我的 config.ru 文件需要是什么样子?

更新/编辑

lib/gollum/frontend/app:

module Precious
  class App < Sinatra::Base

这从 bin/gollum 调用

require 'gollum/frontend/app'
Precious::App.set(:gollum_path, gollum_path)
Precious::App.run!(options)

Gollum is "A simple, Git-powered wiki with a sweet API and local frontend."

It's hosted on GitHub: http://github.com/github/gollum

It seems to be a simple Sinatra app, and as such, it seems like it should be easy to deploy to Heroku. I can't seem to get it to work. Mostly because I know next to nothing about Rake and config.ru files.

Is it even possible to deploy a Gollum wiki to Heroku? If so, what would my config.ru file need to look like?

Update/Edit

lib/gollum/frontend/app:

module Precious
  class App < Sinatra::Base

This gets called from bin/gollum

require 'gollum/frontend/app'
Precious::App.set(:gollum_path, gollum_path)
Precious::App.run!(options)

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

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

发布评论

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

评论(3

活雷疯 2024-10-07 01:35:14

不可能从heroku 运行Gollum。当然不是作为一个可编辑的维基。 Heroku 文件系统是只读的。您也许可以使用它来提供静态内容,但我对此也不确定。

It's not possible to run Gollum from heroku. Certainly not as an editable wiki. The Heroku filesystem is read only. You might be able to use it to serve static content, but I'm not sure about that even.

无边思念无边月 2024-10-07 01:35:14

正如已经提到的,问题在于 heroku 文件系统是只读的。
但真正的问题是底层的勇气,它依赖于 git 命令行工具。如果不将远程存储库克隆到本地目录,则无法使用它们。

请参阅相关的问题

因此,解决方案是将存储库克隆到临时路径,在那里工作并将更改推送到远程存储库。开销很大:每次用户浏览 wiki 页面时都需要克隆存储库。

我想到的另一个解决方案是为 grit 制作一些 API,以便能够远程使用 git。

另一种解决方案是通过 ssh 使用 git。

As already mentioned, the problem is that the heroku filesystem is readonly.
But the real problem is underlying grit, which relies on the git command line tool. You can't work with remote repositories without cloning them to the local directory.

See the related question.

So, the solution will be to clone the repo to temporary path, work there and push changes to the remote repo. There is a much overhead: you need to clone repo every time a user browse a wiki page.

Another solution that comes to mind is making some API for grit that will enable to work with git remotely.

Yet another solution is to work with git over ssh.

惟欲睡 2024-10-07 01:35:14

http://docs.heroku.com/rack#sinatra

require 'hello'
run Sinatra::Application

如果它是 sinatra 应用程序,则应该为你做。

http://docs.heroku.com/rack#sinatra

require 'hello'
run Sinatra::Application

if it is a sinatra app, that should do it for you.

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