Realms
Realms is a git-based wiki (like Gollum, but with basic authentication and registration)
Features include:
- Built with Bootstrap 3.
- Markdown (w/ HTML Support).
- Syntax highlighting (Ace Editor).
- Live preview.
- Collaboration (TogetherJS / Firepad).
- Drafts saved to local storage.
- Handlebars for templates and logic.
Project likely abandoned
In my limited trial, Realms seems less useful than Gollum for my particular use-case (i.e., you're limited to markdown syntax only), but other users may enjoy the basic user authentication and registration features, which Gollum lacks.
Also of note is that the docker image is 1.17GB in size, and the handful of commits to the source GitHub repo in the past year has listed TravisCI build failures. This has many of the hallmarks of an abandoned project, to my mind.
Realms Requirements
Ingredients
Already deployed:
- Docker swarm cluster with persistent shared storage
- Traefik configured per design
- DNS entry for the hostname you intend to use (or a wildcard), pointed to your keepalived IP
Related:
- Traefik Forward Auth or Authelia to secure your Traefik-exposed services with an additional layer of authentication
Preparation
Setup data locations
Since we'll start with a basic Realms install, let's just create a single directory to hold the realms (SQLite) data:
mkdir /var/data/realms/
Realms Docker Swarm config
Create a docker swarm config file in docker-compose syntax (v3), something like the example below:
Fast-track with premix! 🚀
"Premix" is a git repository which includes necessary docker-compose and env files for all published recipes. This means that you can launch any recipe with just a git pull
and a docker stack deploy
👍.
🚀 Update: Premix now includes an ansible playbook, enabling you to deploy an entire stack + recipes, with a single ansible command! (more here)
version: "3"
services:
realms:
image: realms/realms-wiki:latest
volumes:
- /var/data/realms:/home/wiki/data
networks:
- internal
- traefik_public
deploy:
labels:
# traefik common
- traefik.enable=true
- traefik.docker.network=traefik_public
# traefikv1
- traefik.frontend.rule=Host:realms.example.com
- traefik.port=5000
# traefikv2
- "traefik.http.routers.realms.rule=Host(`realms.example.com`)"
- "traefik.http.services.realms.loadbalancer.server.port=5000"
- "traefik.enable=true"
# Remove if you wish to access the URL directly
- "traefik.http.routers.realms.middlewares=forward-auth@file"
networks:
traefik_public:
external: true
internal:
driver: overlay
ipam:
config:
- subnet: 172.16.35.0/24
Note
Setup unique static subnets for every stack you deploy. This avoids IP/gateway conflicts which can otherwise occur when you're creating/removing stacks a lot. See my list here.
Serving
Launch Realms stack
Launch the Wekan stack by running docker stack deploy realms -c <path -to-docker-compose.yml>
Log into your new instance at https://YOUR-FQDN, authenticate against oauth_proxy, and you're immediately presented with Realms wiki, waiting for a fresh edit ;)
Chef's notes 📓
-
If you wanted to expose the realms UI directly, you could remove the traefik-forward-auth from the design. ↩
-
The inclusion of Realms was due to the efforts of @gkoerk in our Discord server- Unfortunately on the 22nd August 2020 Jerry passed away. Jerry was very passionate and highly regarded in the field of Information Technology. He will be missed. ↩
Tip your waiter (sponsor) 👏
Did you receive excellent service? Want to compliment the chef? (..and support development of current and future recipes!) Sponsor me on Github / Ko-Fi / Patreon, or see the contribute page for more (free or paid) ways to say thank you! 👏
Employ your chef (engage) 🤝
Is this too much of a geeky PITA? Do you just want results, stat? I do this for a living - I'm a full-time Kubernetes contractor, providing consulting and engineering expertise to businesses needing short-term, short-notice support in the cloud-native space, including AWS/Azure/GKE, Kubernetes, CI/CD and automation.
Learn more about working with me here.
Flirt with waiter (subscribe) 💌
Want to know now when this recipe gets updated, or when future recipes are added? Subscribe to the RSS feed, or leave your email address below, and we'll keep you updated.