Commit 850bf9c8 authored by Mathias Jud's avatar Mathias Jud

initial commit

parents
Pipeline #95 failed with stages
# configuration files
config.yml
docker-compose.yml
# data base
/data
# git repository
/repo
# git authentication keys
wikijs.key
wikijs.key.pub
wiki.js Configuration
=====================
Ready to use wiki.js docker-compose configuration for a traefik web proxy.
This configuration uses the official wiki.js docker image:
* wiki.js home page: https://wiki.js.org
* Tutorial: https://blog.programster.org/deploy-your-own-wiki-with-wikijs-and-docker
Install
-------
```
# clone repository
git clone git@gitlab.wachter-jud.net:docker/wiki.js.git
# move into directory
cd wiki.js
# copy the sample configuration files
cp docker-compose.yml.sample docker-compose.yml
cp config.yml.sample config.yml
# create the data folder
mkdir data
mkdir repo
# generate an SSH key for syncing
ssh-keygen -o -t rsa -b 4096 -f ./wikijs.key -C "email@example.com"
```
* Create a git repository where your data can be synced.
* Add the newly created SSH public key `wikijs.key.pub` as authentication
key to the repository
Edit docker-compose.yml and change the following value:
* `admin@email.com` the server administration email
* `your.web.domain` the domain name under which this web server will be available
Edit config.yml and change the following values:
* `host`
* `sessionSecret`
* In the `git` section configure the access to the remote git repository:
* `url` your remote repository address e.g. `git@gitlab.com:UserName/wikijs.git`
* `serverEmail` email to add to the git commits
Make sure Docker has the right to read the file `wikijskey` and to
write to the `data` & `repo` folder.
Usage
-----
```
# start wiki.js
docker-compose up -d
# stop wiki.js
docker-compose down
# upgrade container
docker-compose pull
```
After First Start
-----------------
Open the configurated http://your.web.domain and login with
* Configured `WIKI_ADMIN_EMAIL`
* Default Password: admin123
#######################################################################
# Wiki.js - CONFIGURATION #
#######################################################################
# Full explanation + examples in the documentation:
# https://docs.requarks.io/wiki/install
# You can use an ENV variable by using $(ENV_VAR_NAME) as the value
#
# Copy this file to config.yml and change the `Mandatory Configuration`
# section to your needs.
#
#######################################################################
# Mandatory Configuration #
#######################################################################
# ---------------------------------------------------------------------
# Full public path to the site, without the trailing slash
# ---------------------------------------------------------------------
# INCLUDE CLIENT PORT IF NOT 80/443!
host: http://localhost
# ---------------------------------------------------------------------
# Secret key to use when encrypting sessions
# ---------------------------------------------------------------------
# Use a long and unique random string (256-bit keys are perfect!)
sessionSecret: 1234567890abcdefghijklmnopqrstuvxyz
# ---------------------------------------------------------------------
# Git Connection Info
# ---------------------------------------------------------------------
git:
url: git@gitlab.com:UserName/wikijs.git
branch: master
auth:
type: ssh
privateKey: /etc/wiki/keys/git.pem
#sslVerify: true
serverEmail: your@email.com
showUserEmail: true
#######################################################################
# Optional Configuration #
#######################################################################
# ---------------------------------------------------------------------
# Title of this site
# ---------------------------------------------------------------------
title: Wiki
# ---------------------------------------------------------------------
# Port the main server should listen to (80 by default)
# ---------------------------------------------------------------------
# To use process.env.PORT, comment the line below:
port: 80
# ---------------------------------------------------------------------
# Data Directories
# ---------------------------------------------------------------------
paths:
repo: ./repo
data: ./data
# ---------------------------------------------------------------------
# Upload Limits
# ---------------------------------------------------------------------
# In megabytes (MB)
uploads:
maxImageFileSize: 3
maxOtherFileSize: 100
# ---------------------------------------------------------------------
# Site Language
# ---------------------------------------------------------------------
# Possible values: en, de, es, fa, fr, ja, ko, nl, pt, ru, sr, sv, tr or zh
lang: en
# Enable for right to left languages (e.g. arabic):
langRtl: false
# ---------------------------------------------------------------------
# Site Authentication
# ---------------------------------------------------------------------
public: false
auth:
defaultReadAccess: false
local:
enabled: true
google:
enabled: false
clientId: GOOGLE_CLIENT_ID
clientSecret: GOOGLE_CLIENT_SECRET
microsoft:
enabled: false
clientId: MS_APP_ID
clientSecret: MS_APP_SECRET
facebook:
enabled: false
clientId: FACEBOOK_APP_ID
clientSecret: FACEBOOK_APP_SECRET
github:
enabled: false
clientId: GITHUB_CLIENT_ID
clientSecret: GITHUB_CLIENT_SECRET
slack:
enabled: false
clientId: 'SLACK_CLIENT_ID'
clientSecret: 'SLACK_CLIENT_SECRET'
ldap:
enabled: false
url: ldap://serverhost:389
bindDn: cn='root'
bindCredentials: BIND_PASSWORD
searchBase: o=users,o=example.com
searchFilter: (uid={{username}})
tlsEnabled: false
tlsCertPath: C:\example\root_ca_cert.crt
azure:
enabled: false
clientId: APP_ID
clientSecret: APP_SECRET_KEY
resource: '00000002-0000-0000-c000-000000000000'
tenant: 'YOUR_TENANT.onmicrosoft.com'
oauth2:
enabled: false
clientId: OAUTH2_CLIENT_ID
clientSecret: OAUTH2_CLIENT_SECRET
authorizationURL: OAUTH2_AUTH_URL
tokenURL: OAUTH2_TOKEN_URL
oidc:
enabled: false
clientId: OPENID_CONNECT_CLIENT_ID
clientSecret: OPENID_CONNECT_CLIENT_SECRET
issuer: OPENID_CONNECT_ISSUER
userInfoUrl: OPENID_CONNECT_USER_INFO_URL
authorizationURL: OPENID_CONNECT_AUTHORIZATION_URL
tokenURL: OPENID_CONNECT_TOKEN_URL
emailClaim: OPENID_CONNECT_EMAIL_CLAIM_PATH
usernameClaim: OPENID_CONNECT_USERNAME_CLAIM_PATH
# ---------------------------------------------------------------------
# Database Connection String
# ---------------------------------------------------------------------
db: mongodb://wikidb:27017/wiki
# ---------------------------------------------------------------------
# Features
# ---------------------------------------------------------------------
# You can enable / disable specific features below
features:
linebreaks: true
mathjax: true
# ---------------------------------------------------------------------
# External Logging
# ---------------------------------------------------------------------
externalLogging:
bugsnag: false
loggly: false
papertrail: false
rollbar: false
sentry: false
# ---------------------------------------------------------------------
# Color Theme
# ---------------------------------------------------------------------
theme:
primary: indigo
alt: blue-grey
viewSource: all # all | write | false
footer: blue-grey
code:
dark: true
colorize: true
## docker-compose configuration file for wikijs wiki engine
##
## name this file docker-compose.yml
## and edit the following values:
##
## admin@email.com
## your.wikijs.domain
##
version: '3'
services:
wikidb:
image: mongo:3
expose:
- '27017'
command: '--smallfiles --bind_ip ::,0.0.0.0'
environment:
- 'MONGO_LOG_DIR=/dev/null'
volumes:
- ./data:/data/db
networks:
- traefik_network
wikijs:
image: 'requarks/wiki:latest'
links:
- wikidb
depends_on:
- wikidb
volumes:
- ./config.yml:/var/wiki/config.yml
- ./wikijs.key:/etc/wiki/keys/git.pem
- ./repo:/var/wiki/repo
environment:
##############################################
## Edit the following value ##
##############################################
WIKI_ADMIN_EMAIL: admin@email.com
##############################################
labels:
##############################################
## Edit the following value ##
##############################################
- "traefik.frontend.rule=Host:your.wikijs.domain"
##############################################
- traefik.port=80
- traefik.frontend.passHostHeader=true
- "traefik.frontend.entryPoints=http,https"
networks:
- traefik_network
#ports:
# - '3000:80'
networks:
traefik_network:
external:
name: traefik_default
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment