Home

Awesome

Hotmaps wiki

This wiki uses gollum and omnigollum.

Build

docker build -t hotmaps/wiki . 

Run

Run wiki from Dockerfile

Replace -e ENV_VARIABLES

docker run -d --rm 
-p 80:4567 
--name wiki 
-e GITHUB_CLIENT_ID=0123456789 
-e GITHUB_CLIENT_SECRET=0123456789 
-e AUTH_USERS=email1,email2,email3
hotmaps/wiki

Run wiki from docker-compose

Create .env file based on .env.example and update environment variables.

# ./docker-compose.yml

version: '3.2'
services:
  wiki:
    env_file: .env
    build: .
    ports:
      - "80:80"

Run docker-compose (in terminal)

docker-compose up -d 

Configuration

Here are the environment variables that you need to configure to make the container work:

OAuth configuration

For GitHub, you need to create client ID and client secret on GitHub website on the settings page of your account or ogranization, in developer settings, OAuth Apps.

To add another provider you should also edit config.rb:

# ./config.rb

# [...]

options = {
  # OmniAuth::Builder block is passed as a proc
  :providers => Proc.new do

    # GitHub
    provider :github, ENV['GITHUB_CLIENT_ID'], ENV['GITHUB_CLIENT_SECRET'],
    
    # LDAP
    provider :ldap,
      :host => '127.0.0.1',
      :port => 389,
      :method => :plain,
      :base => 'dc=example,dc=com',
      :uid => 'uid',
      :bind_dn => 'cn=manager,dc=example,dc=com',
      :password => 'password'
    
    # Twitter
    provider :twitter, 'CONSUMER_KEY', 'CONSUMER_SECRET'
    
    # OpenID
    provider :open_id, OpenID::Store::Filesystem.new('/tmp')  
    
    # others ...

  # [...]
}

Omnigollum allows many OAuth providers. You can find more information about this here.