jn64 / gollum

Guide to using Gollum wiki with Podman/systemd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is a guide to using Gollum (Git-powered wiki with browser frontend) to run a local wiki with certain requirements:

Instructions

We will use this branch as the basis of a new wiki, with some example config included.

  1. Clone this branch to ~/wiki. This will be your wiki.

    git clone -b example --depth 1 https://github.com/jn64/gollum.git ~/wiki
  2. Reset the git history (you don't need your wiki to be linked to this repo):

    cd ~/wiki
    rm -rf ~/wiki/.git
    git init -b main
    git add -A
    git commit -m init
  3. Build custom Gollum image that includes commonmarker instead of kramdown:

    podman build -t gollum:v5.3.2-commonmark https://github.com/jn64/gollum.git#v5.3.2-commonmark

    The resulting image is localhost/gollum:v5.3.2-commonmark (check podman images).

  4. Create a container with this custom image:

    podman run --name gollum -d --rm --security-opt label=disable -v "${HOME}/wiki":/wiki -v "${HOME}/wiki/.gollum":/etc/gollum -p 4567:4567 localhost/gollum:v5.3.2-commonmark --config /etc/gollum/config.rb

    Test it by opening http://localhost:4567 in your browser. Make sure it works (edit, create new page, etc).

  5. Generate systemd service from the running container's configuration:

    podman generate systemd -n --new gollum | sed -E -e '/^(Wants|After)=network-online.target$/ d' > ~/wiki/.gollum/container-gollum.service

    (The sed removes an unnecessary dependency on network-online.target)

  6. Stop the container:

    podman container stop gollum
  7. Install and enable the user service:

    systemctl --user enable --now ~/wiki/.gollum/container-gollum.service

Done. Now the Gollum container will run automatically on your user login.

For convenience, pin or bookmark http://localhost:4567 in your browser.

Configuration

See .gollum/config.rb

References

About

Guide to using Gollum wiki with Podman/systemd


Languages

Language:Ruby 100.0%