1
0
mirror of https://github.com/funkypenguin/geek-cookbook/ synced 2025-12-13 01:36:23 +00:00

Add Gollum, my precious!

This commit is contained in:
David Young
2017-08-29 21:48:55 +12:00
parent f5c24af75c
commit 151e6df01c
15 changed files with 188 additions and 9 deletions

View File

@@ -18,6 +18,11 @@ recipies/mail.md
recipies/gitlab.md recipies/gitlab.md
recipies/gitlab-runner.md recipies/gitlab-runner.md
recipies/wekan.md recipies/wekan.md
recipies/huginn.md
recipies/kanboard.md
recipies/miniflux.md
recipies/ghost.md
recipies/piwik.md
sections/reference.md sections/reference.md
reference/oauth_proxy.md reference/oauth_proxy.md

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

View File

@@ -24,6 +24,9 @@ mkdir -p /var/data/ghost
Create a docker swarm config file in docker-compose syntax (v3), something like this: 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' version: '3'

View File

@@ -49,6 +49,9 @@ GITLAB_ROOT_PASSWORD
Create a docker swarm config file in docker-compose syntax (v3), something like this: 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' version: '3'
@@ -102,9 +105,9 @@ networks:
ipam: ipam:
config: config:
- subnet: 172.16.2.0/24 - subnet: 172.16.2.0/24
- -
``` ```
!!! tip !!! 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. 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.

View File

@@ -0,0 +1,128 @@
# Gollum
Gollum is a simple wiki system built on top of Git. A Gollum Wiki is simply a git repository (_either bare or regular_) of a specific nature:
* A Gollum repository's contents are human-editable, unless the repository is bare.
* Pages are unique text files which may be organized into directories any way you choose.
* Other content can also be included, for example images, PDFs and headers/footers for your pages.
Gollum pages:
* May be written in a variety of markups.
* Can be edited with your favourite system editor or IDE (_changes will be visible after committing_) or with the built-in web interface.
* Can be displayed in all versions (_commits_).
![Gollum Screenshot](../images/gollum.png)
As you'll note in the (_real world_) screenshot above, my requirements for a personal wiki are:
* Portable across my devices
* Supports images
* Full-text search
* Supports inter-note links
* Revision control
Gollum meets all these requirements, and as an added bonus, is extremely fast and lightweight.
!!! note
Since Gollum itself offers no user authentication, this design secures gollum behind an [oauth2 proxy](/reference/oauth_proxy/), so that in order to gain access to the Gollum UI at all, oauth2 authentication (_to GitHub, GitLab, Google, etc_) must have already occurred.
## Ingredients
1. [Docker swarm cluster](/ha-docker-swarm/) with [persistent shared storage](/ha-docker-swarm/shared-storage-ceph.md)
2. [Traefik](/ha-docker-swarm/traefik) configured per design
## Preparation
### Setup data locations
We'll need an empty git repository in /var/data/gollum for our data:
```
mkdir /var/data/gollum
cd /var/data/gollum
git init
```
### Prepare environment
1. Choose an oauth provider, and obtain a client ID and secret
2. Create gollum.env, and populate with the following variables (_you can make the cookie secret whatever you like_)
```
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:
app:
image: dakue/gollum
volumes:
- /var/data/gollum:/gollum
networks:
- internal
command: |
--allow-uploads
--emoji
--user-icons gravatar
proxy:
image: zappi/oauth2_proxy
env_file : /var/data/config/gollum/gollum.env
networks:
- internal
- traefik_public
deploy:
labels:
- traefik.frontend.rule=Host:gollum.example.com
- traefik.docker.network=traefik_public
- traefik.port=4180
volumes:
- /var/data/config/gollum/authenticated-emails.txt:/authenticated-emails.txt
command: |
-cookie-secure=false
-upstream=http://app:4567
-redirect-url=https://gollum.example.com
-http-address=http://0.0.0.0:4180
-email-domain=example.com
-provider=github
-authenticated-emails-file=/authenticated-emails.txt
networks:
traefik_public:
external: true
internal:
driver: overlay
ipam:
config:
- subnet: 172.16.9.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 Gollum stack
Launch the Gollum stack by running ```docker stack deploy gollum -c <path-to-docker-compose.yml>```
Authenticate against your OAuth provider, and then start editing your wiki!
## Chef's Notes
1. In the current implementation, Gollum is a "single user" tool only. The contents of the wiki are saved as markdown files under /var/data/gollum, and all the git commits are currently "Anonymous"

View File

@@ -64,6 +64,10 @@ POSTGRES_PASSWORD=<database password>
Create a docker swarm config file in docker-compose syntax (v3), something like this: 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' version: '3'
@@ -121,7 +125,7 @@ networks:
- subnet: 172.16.6.0/24 - subnet: 172.16.6.0/24
``` ```
!!! tip !!! 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. 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.

View File

@@ -37,6 +37,10 @@ mkdir -p /var/data/kanboard
Create a docker swarm config file in docker-compose syntax (v3), something like this: 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' version: '3'

View File

@@ -92,6 +92,9 @@ Create the necessary DNS TXT entries for your domain(s). Note that although open
Create a docker swarm config file in docker-compose syntax (v3), something like this: 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' version: '3'
@@ -123,7 +126,7 @@ networks:
- subnet: 172.16.2.0/24 - subnet: 172.16.2.0/24
``` ```
!!! tip !!! 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. 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.
A sample .env file looks like this: A sample .env file looks like this:

View File

@@ -30,6 +30,9 @@ mkdir -p /var/data/miniflux
Create a docker swarm config file in docker-compose syntax (v3), something like this: 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' version: '3'

View File

@@ -28,6 +28,11 @@ MYSQL_ROOT_PASSWORD=set-me-and-use-me-when-setting-up-piwik
### Setup docker swarm ### 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' version: '3'
@@ -77,7 +82,7 @@ networks:
- subnet: 172.16.4.0/24 - subnet: 172.16.4.0/24
``` ```
!!! tip !!! 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. 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.

View File

@@ -40,6 +40,10 @@ MAIL_FROM="Wekan <wekan@wekan.example.com>"
Create a docker swarm config file in docker-compose syntax (v3), something like this: 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' version: '3'
@@ -89,7 +93,7 @@ networks:
- subnet: 172.16.3.0/24 - subnet: 172.16.3.0/24
``` ```
!!! tip !!! 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. 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.

View File

@@ -55,6 +55,12 @@ S6_BEHAVIOUR_IF_STAGE2_FAILS=2
### Setup docker swarm ### 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' version: '3'
@@ -84,7 +90,7 @@ services:
env_file: /var/data/ttrss/ttrss.env env_file: /var/data/ttrss/ttrss.env
volumes: volumes:
- /var/data/ttrss/database-dump:/dump - /var/data/ttrss/database-dump:/dump
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
entrypoint: | entrypoint: |
bash -c 'bash -s <<EOF bash -c 'bash -s <<EOF
trap "break;exit" SIGHUP SIGINT SIGTERM trap "break;exit" SIGHUP SIGINT SIGTERM
@@ -108,6 +114,10 @@ networks:
- subnet: 172.16.5.0/24 - subnet: 172.16.5.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 ## Serving
### Launch TTRSS stack ### Launch TTRSS stack

View File

@@ -9,7 +9,7 @@ Wekan allows to create Boards, on which Cards can be moved around between a numb
There's a [video](https://www.youtube.com/watch?v=N3iMLwCNOro) of the developer showing off the app, as well as a f[unctional demo](https://wekan.indie.host/b/t2YaGmyXgNkppcFBq/wekan-fork-roadmap). There's a [video](https://www.youtube.com/watch?v=N3iMLwCNOro) of the developer showing off the app, as well as a f[unctional demo](https://wekan.indie.host/b/t2YaGmyXgNkppcFBq/wekan-fork-roadmap).
!!! note !!! note
For added privacy, this design secures wekan behind an [oauth2 proxy](/reference/oauth_proxy/), so that in order to gain access to the wekan UI at all, oauth2 authentication (to GitHub, GitLab, Google, etc) must have already occured. For added privacy, this design secures wekan behind an [oauth2 proxy](/reference/oauth_proxy/), so that in order to gain access to the wekan UI at all, oauth2 authentication (_to GitHub, GitLab, Google, etc_) must have already occurred.
## Ingredients ## Ingredients
@@ -52,6 +52,9 @@ BACKUP_FREQUENCY=1d
Create a docker swarm config file in docker-compose syntax (v3), something like this: 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' version: '3'
@@ -123,7 +126,7 @@ networks:
- subnet: 172.16.3.0/24 - subnet: 172.16.3.0/24
``` ```
!!! tip !!! 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. 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.

View File

@@ -11,3 +11,6 @@ Network | Range
[Piwik](https://geek-cookbook.funkypenguin.co.nz/recipies/piwki/) | 172.16.4.0/24 [Piwik](https://geek-cookbook.funkypenguin.co.nz/recipies/piwki/) | 172.16.4.0/24
[Tiny Tiny RSS](https://geek-cookbook.funkypenguin.co.nz/recipies/tiny-tiny-rss/) | 172.16.5.0/24 [Tiny Tiny RSS](https://geek-cookbook.funkypenguin.co.nz/recipies/tiny-tiny-rss/) | 172.16.5.0/24
[Huginn](https://geek-cookbook.funkypenguin.co.nz/recipies/huginn/) | 172.16.6.0/24 [Huginn](https://geek-cookbook.funkypenguin.co.nz/recipies/huginn/) | 172.16.6.0/24
[Unifi](https://geek-cookbook.funkypenguin.co.nz/recipies/unifi/) | 172.16.7.0/24
[Kanboard](https://geek-cookbook.funkypenguin.co.nz/recipies/unifi/) | 172.16.8.0/24
[Gollum](https://geek-cookbook.funkypenguin.co.nz/recipies/unifi/) | 172.16.9.0/24

View File

@@ -38,6 +38,7 @@ pages:
- Huginn: recipies/huginn.md - Huginn: recipies/huginn.md
- Kanboard: recipies/kanboard.md - Kanboard: recipies/kanboard.md
- Miniflux: recipies/miniflux.md - Miniflux: recipies/miniflux.md
- Gollum: recipies/gollum.md
- Menu: - Menu:
- Ghost: recipies/ghost.md - Ghost: recipies/ghost.md
- GitLab: recipies/gitlab.md - GitLab: recipies/gitlab.md