Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploy Gollum wiki to Heroku

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)
like image 837
irkenInvader Avatar asked Oct 28 '10 23:10

irkenInvader


2 Answers

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.

like image 87
namelessjon Avatar answered Sep 28 '22 04:09

namelessjon


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.

like image 40
Vanuan Avatar answered Sep 28 '22 06:09

Vanuan