Deploy Gollum wiki to Heroku

…衆ロ難τιáo~ 提交于 2019-12-09 08:39:14

问题


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)

回答1:


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.




回答2:


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.




回答3:


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

require 'hello'
run Sinatra::Application

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



来源:https://stackoverflow.com/questions/4047999/deploy-gollum-wiki-to-heroku

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!