All posts by ykyuen

Life is for fun~ =)

Gollum with Apache ProxyPass

Say if you have Gollum running on http://192.168.0.1:4567 and you have a reverse proxy (ex: www.abc.com) in front of it such that you want to allow the team to access it on http://www.abc.com/docs. You need to setup a ProxyPass on the reverse proxy. Say in Apache.

<VirtualHost *:80>
  ServerName www.abc.com
  ProxyPass /docs http://192.168.0.1:4567/docs
  ProxyPassReverse /docs http://192.168.0.1:4567/docs
</VirtualHost>

 

It would work but the site asset path would be incorrect. So you need to specify the base path when you start Gollum. Continue reading Gollum with Apache ProxyPass

Gollum – Auto sync to git remote repository

Whenever you have edited any page on Gollum, it will committed to the local repository which is checked out on the server. These commits WILL NOT be pushed to the Git Server. Similarly any push to the Git server will not sync to the repository running Gollum as it won’t execute git pull neither.

You may think of using the Git post-commit hook to trigger the synchronization whenever a commit is done but Gollum run Grit as the Git adapter and Grit doesn’t support hook.

A workaround suggested by Rod Hilton is to setup a cronjob and keep running the git push and pull on the server running Gollum.

So add the following sync.sh to your Gollum project root. Continue reading Gollum – Auto sync to git remote repository

Gollum – Add Git identity by running Gollum as a Rack appliaction

Gollum is a simple documentation app base on Git. I could write the docs in markdown and all changes would be governed by the Git repository.

But the application doesn’t support any authentication and that means there is no way to trace who has committed the code.

Kudos to Stephanie Collett who wrote a rackup file for Gollum such that it will prompt for user email before the user start editing. That email is stored in session and would be used as identifying during commit.

Here is the config.ru Continue reading Gollum – Add Git identity by running Gollum as a Rack appliaction