1
0
mirror of https://github.com/funkypenguin/geek-cookbook/ synced 2025-12-13 17:56:26 +00:00

Add realms

This commit is contained in:
David Young
2018-10-10 21:28:01 +13:00
parent 195c26f6d1
commit 9c5c595779
5 changed files with 135 additions and 16 deletions

View File

@@ -9,12 +9,12 @@
## Recently added recipes ## Recently added recipes
* Added [Realms](/recipies/realms/), another git-based wiki, like [Gollum](/recipies/gollum/), but including basic user auth and registration
* Added a list of useful funkypenguin Docker [containers](/reference/containers/) (_7 Oct 2018_) * Added a list of useful funkypenguin Docker [containers](/reference/containers/) (_7 Oct 2018_)
* Added [Swarmprom](/recipies/swarmprom/), the sexiest way visualise detailed performance metrics from your swarm (_17 Sep 2018_) * Added [Swarmprom](/recipies/swarmprom/), the sexiest way visualise detailed performance metrics from your swarm (_17 Sep 2018_)
* Added [BookStack](/recipies/bookstack/), lightweight personal documentation platform (_20 Aug 2018_) * Added [BookStack](/recipies/bookstack/), lightweight personal documentation platform (_20 Aug 2018_)
* Added [Athena Pool](/recipies/cryptonote-mining-pool/athena/), a mining pool for [TurtleCoin](http://turtlecoin.lol)'s newborn baby sister * Added [Athena Pool](/recipies/cryptonote-mining-pool/athena/), a mining pool for [TurtleCoin](http://turtlecoin.lol)'s newborn baby sister
* Added [Munin](/recipies/munin/), gatherer of highly details performance stats (_21 Jun 2018_) * Added [Munin](/recipies/munin/), gatherer of highly details performance stats (_21 Jun 2018_)
* Added [OwnTracks](/recipies/owntracks/), personal mobile location platform (_17 Jun 2018_)
## Recent improvements ## Recent improvements
@@ -22,5 +22,3 @@
* [Autopirate](/recipies/autopirate/start/) uber-recipe updated for [Lidarr](/recipies/autopirate/lidarr/) (_like Sonarr/Radarr for music, an alternative to Headphones_) (_19 Sep 2018_) * [Autopirate](/recipies/autopirate/start/) uber-recipe updated for [Lidarr](/recipies/autopirate/lidarr/) (_like Sonarr/Radarr for music, an alternative to Headphones_) (_19 Sep 2018_)
* [GitLab](/recipies/gitlab/) recipe updated with missing env variables, brought up to scratch with more recent design conventions (_14 Jun 2018_) * [GitLab](/recipies/gitlab/) recipe updated with missing env variables, brought up to scratch with more recent design conventions (_14 Jun 2018_)
* [SABnzbd](/recipies/autopirate/sabnzbd/) component of [autopirate](/recipies/autopirate/start/) recipe updated for new hostname validation check in recent version (_10 Jun 2018_) * [SABnzbd](/recipies/autopirate/sabnzbd/) component of [autopirate](/recipies/autopirate/start/) recipe updated for new hostname validation check in recent version (_10 Jun 2018_)
* [Lazy Librarian](/recipies/autopirate/lazylibrarian/) component of [autopirate](/recipies/autopirate/start/) recipe updated to include calibre-server, so that downloaded ebooks can be automatically added to a calibre library, to then be independently managed using [Calibre-Web](/recipies/calibre-web/) (_27 May 2018_)
* [Miniflux](/recipies/miniflux/) updated to version 2.0, including PostgreSQL database and nightly DB dumps (_24 May 2018_)

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

View File

@@ -0,0 +1,120 @@
# Realms
Realms is a git-based wiki (_like [Gollum](/recipies/gollum/), but with basic authentication and registration_)
![Realms Screenshot](../images/realms.png)
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.
!!! warning "Project likely abandoned"
In my limited trial, Realms seems _less_ useful than [Gollum](/recipies/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](https://github.com/scragg0x/realms-wiki/commits/master) in the past year has listed TravisCI build failures. This has many of the hallmarks of an abandoned project, to my mind.
## Ingredients
1. [Docker swarm cluster](/ha-docker-swarm/design/) with [persistent shared storage](/ha-docker-swarm/shared-storage-ceph.md)
2. [Traefik](/ha-docker-swarm/traefik_public) configured per design
3. DNS entry for the hostname you intend to use, pointed to your [keepalived](ha-docker-swarm/keepalived/) IP
## 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/
```
Create realms.env, and populate with the following variables (_if you intend to use an [oauth_proxy](/reference/oauth_proxy) to double-secure your installation, which I recommend_)
```
OAUTH2_PROXY_CLIENT_ID=
OAUTH2_PROXY_CLIENT_SECRET=
OAUTH2_PROXY_COOKIE_SECRET=
```
### Setup Docker Swarm
Create a docker swarm config file in docker-compose syntax (v3), something like this:
!!! tip
I share (_with my [patreon patrons](https://www.patreon.com/funkypenguin)_) a private "_premix_" git repository, which includes necessary docker-compose and env files for all published recipes. This means that patrons can launch any recipe with just a ```git pull``` and a ```docker stack deploy``` 👍
```
version: "3"
services:
realms:
image: realms/realms-wiki:latest
env_file: /var/data/config/realms/realms.env
volumes:
- /var/data/realms:/home/wiki/data
networks:
- internal
realms_proxy:
image: funkypenguin/oauth2_proxy:latest
env_file : /var/data/config/realms/realms.env
networks:
- internal
- traefik_public
deploy:
labels:
- traefik.frontend.rule=Host:realms.funkypenguin.co.nz
- traefik.docker.network=traefik_public
- traefik.port=4180
volumes:
- /var/data/config/realms/authenticated-emails.txt:/authenticated-emails.txt
command: |
-cookie-secure=false
-upstream=http://realms:5000
-redirect-url=https://realms.funkypenguin.co.nz
-http-address=http://0.0.0.0:4180
-email-domain=funkypenguin.co.nz
-provider=github
-authenticated-emails-file=/authenticated-emails.txt
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](/reference/networks/) 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
1. If you wanted to expose the Realms UI directly, you could remove the oauth2_proxy from the design, and move the traefik_public-related labels directly to the realms container. You'd also need to add the traefik_public network to the realms container.
2. The inclusion of Realms was due to the efforts of @gkoerk in our [Discord server](http://chat.funkypenguin.co.nz). Thanks gkoerk!
### Tip your waiter (donate) 👏
Did you receive excellent service? Want to make your waiter happy? (_..and support development of current and future recipes!_) See the [support](/support/) page for (_free or paid)_ ways to say thank you! 👏
### Your comments? 💬

View File

@@ -37,6 +37,7 @@ Network | Range
[Realms](https://geek-cookbook.funkypenguin.co.nz/recipies/realms/) | 172.16.35.0/24 [Realms](https://geek-cookbook.funkypenguin.co.nz/recipies/realms/) | 172.16.35.0/24
[ElkarBackup](https://geek-cookbook.funkypenguin.co.nz/recipies/elkarbackp/) | 172.16.36.0/24 [ElkarBackup](https://geek-cookbook.funkypenguin.co.nz/recipies/elkarbackp/) | 172.16.36.0/24
[Mayan EDMS](https://geek-cookbook.funkypenguin.co.nz/recipies/realms/) | 172.16.37.0/24 [Mayan EDMS](https://geek-cookbook.funkypenguin.co.nz/recipies/realms/) | 172.16.37.0/24
[Shaarli](https://geek-cookbook.funkypenguin.co.nz/recipies/shaarli/) | 172.16.38.0/24
## Chef's Notes ## Chef's Notes

View File

@@ -55,7 +55,7 @@ pages:
- NZBHydra 2: recipies/autopirate/nzbhydra2.md - NZBHydra 2: recipies/autopirate/nzbhydra2.md
- Ombi: recipies/autopirate/ombi.md - Ombi: recipies/autopirate/ombi.md
- Jackett: recipies/autopirate/jackett.md - Jackett: recipies/autopirate/jackett.md
- Heimdall: recipies/autopirate/heimdall.md - Heimdall: recipies/autopirate/heimdall.md
- End: recipies/autopirate/end.md - End: recipies/autopirate/end.md
- NextCloud: recipies/nextcloud.md - NextCloud: recipies/nextcloud.md
- Plex: recipies/plex.md - Plex: recipies/plex.md
@@ -63,18 +63,6 @@ pages:
- Munin: recipies/munin.md - Munin: recipies/munin.md
- Home Assistant: recipies/homeassistant.md - Home Assistant: recipies/homeassistant.md
- OwnTracks: recipies/owntracks.md - OwnTracks: recipies/owntracks.md
- CryptoMiner:
- Start: recipies/cryptominer.md
- Mining Rig: recipies/cryptominer/mining-rig.md
- AMD GPU: recipies/cryptominer/amd-gpu.md
- NVidia GPU: recipies/cryptominer/nvidia-gpu.md
- Mining Pools : recipies/cryptominer/mining-pool.md
- Wallets : recipies/cryptominer/wallet.md
- Exchanges: recipies/cryptominer/exchange.md
- Minerhotel: recipies/cryptominer/minerhotel.md
- Monitoring: recipies/cryptominer/monitor.md
- Profit!: recipies/cryptominer/profit.md
- Wallabag: recipies/wallabag.md
- Swarmprom: recipies/swarmprom.md - Swarmprom: recipies/swarmprom.md
- Turtle Pool: recipies/turtle-pool.md - Turtle Pool: recipies/turtle-pool.md
- Menu: - Menu:
@@ -83,6 +71,7 @@ pages:
- GitLab: recipies/gitlab.md - GitLab: recipies/gitlab.md
- GitLab Runner: recipies/gitlab-runner.md - GitLab Runner: recipies/gitlab-runner.md
- Gollum: recipies/gollum.md - Gollum: recipies/gollum.md
- Realms: recipies/realms.md
- Piwik: recipies/piwik.md - Piwik: recipies/piwik.md
- Wekan: recipies/wekan.md - Wekan: recipies/wekan.md
- Tiny Tiny RSS: recipies/tiny-tiny-rss.md - Tiny Tiny RSS: recipies/tiny-tiny-rss.md
@@ -94,6 +83,17 @@ pages:
- Start: recipies/cryptonote-mining-pool.md - Start: recipies/cryptonote-mining-pool.md
# - Masari: recipies/cryptonote-mining-pool/masari.md # - Masari: recipies/cryptonote-mining-pool/masari.md
- Athena: recipies/cryptonote-mining-pool/athena.md - Athena: recipies/cryptonote-mining-pool/athena.md
- CryptoMiner:
- Start: recipies/cryptominer.md
- Mining Rig: recipies/cryptominer/mining-rig.md
- AMD GPU: recipies/cryptominer/amd-gpu.md
- NVidia GPU: recipies/cryptominer/nvidia-gpu.md
- Mining Pools : recipies/cryptominer/mining-pool.md
- Wallets : recipies/cryptominer/wallet.md
- Exchanges: recipies/cryptominer/exchange.md
- Minerhotel: recipies/cryptominer/minerhotel.md
- Monitoring: recipies/cryptominer/monitor.md
- Profit!: recipies/cryptominer/profit.md
- Reference: - Reference:
- OAuth Proxy: reference/oauth_proxy.md - OAuth Proxy: reference/oauth_proxy.md
- Data Layout: reference/data_layout.md - Data Layout: reference/data_layout.md