Created separate template for v2

This commit is contained in:
WilliamMiceli
2019-11-23 23:28:54 -05:00
parent c59699ca2a
commit b01f9ebb01
8 changed files with 130 additions and 7 deletions

View File

@@ -0,0 +1,3 @@
# Wiki.js (v1)
Default admin password: "admin123"

View File

@@ -0,0 +1,72 @@
version: '2'
services:
mongo:
image: mongo:3
command: '--smallfiles --bind_ip ::,0.0.0.0'
dns: # Using Cloudflare DNS
- 1.1.1.1
- 1.0.0.1
- 2606:4700:4700::1111
- 2606:4700:4700::1001
environment:
MONGO_LOG_DIR: /dev/null
labels:
io.rancher.container.pull_image: always
{{- if .Values.HOST_LABEL}}
io.rancher.scheduler.affinity:host_label: ${HOST_LABEL}
{{- end}}
traefik.enable: false
restart: on-failure
volumes:
- /etc/localtime:/etc/localtime:ro # Syncronize time of container with the host system
- /etc/timezone:/etc/timezone:ro # Syncronize timezone of container with the host system
- /Persistent/${DATA_DIR}/Database/Data:/data/db
- /Persistent/${DATA_DIR}/Database/Dump:/dump
wikijs:
image: requarks/wiki:1.0
dns: # Using Cloudflare DNS
- 1.1.1.1
- 1.0.0.1
- 2606:4700:4700::1111
- 2606:4700:4700::1001
environment:
WIKI_ADMIN_EMAIL: ${ADMIN_EMAIL}
labels:
io.rancher.container.pull_image: always
{{- if .Values.HOST_LABEL}}
io.rancher.scheduler.affinity:host_label: ${HOST_LABEL}
{{- end}}
### Begin Traefik Configuration
traefik.enable: true
# Routers
traefik.http.routers.{{.Stack.Name}}-router-http.entrypoints: http
traefik.http.routers.{{.Stack.Name}}-router-http.rule: Host(`${TRAEFIK_HOST}`)
traefik.http.routers.{{.Stack.Name}}-router-http.middlewares: {{.Stack.Name}}-redirectHttp
traefik.http.routers.{{.Stack.Name}}-router-http.service: {{.Stack.Name}}-service-http
traefik.http.routers.{{.Stack.Name}}-router-https.entrypoints: https
traefik.http.routers.{{.Stack.Name}}-router-https.rule: Host(`${TRAEFIK_HOST}`)
traefik.http.routers.{{.Stack.Name}}-router-https.tls: true
traefik.http.routers.{{.Stack.Name}}-router-https.tls.certresolver: letsencrypt
traefik.http.routers.{{.Stack.Name}}-router-https.middlewares: {{.Stack.Name}}-security
traefik.http.routers.{{.Stack.Name}}-router-https.service: {{.Stack.Name}}-service-http
# Middlewares
traefik.http.middlewares.{{.Stack.Name}}-redirectHttp.redirectscheme.permanent: true
traefik.http.middlewares.{{.Stack.Name}}-redirectHttp.redirectscheme.scheme: https
traefik.http.middlewares.{{.Stack.Name}}-security.headers.forceSTSHeader: true
traefik.http.middlewares.{{.Stack.Name}}-security.headers.referrerPolicy: no-referrer # Prevents leaking of referer information
traefik.http.middlewares.{{.Stack.Name}}-security.headers.sslredirect: true # Maybe good for redundancy?
traefik.http.middlewares.{{.Stack.Name}}-security.headers.stsIncludeSubdomains: true
traefik.http.middlewares.{{.Stack.Name}}-security.headers.stsPreload: true
traefik.http.middlewares.{{.Stack.Name}}-security.headers.stsSeconds: "15552000"
# Services
traefik.http.services.{{.Stack.Name}}-service-http.loadbalancer.passhostheader: true
traefik.http.services.{{.Stack.Name}}-service-http.loadbalancer.server.port: "80"
### End Traefik Configuration
links:
- mongo
restart: on-failure
volumes:
- /etc/localtime:/etc/localtime:ro # Syncronize time of container with the host system
- /etc/timezone:/etc/timezone:ro # Syncronize timezone of container with the host system
- /Persistent/${DATA_DIR}/Wiki/config.yml:/var/wiki/config.yml

View File

@@ -0,0 +1,42 @@
version: '2'
catalog:
name: Wiki.js
version: 1.0
# description:
# minimum_rancher_version:
# maximum_rancher_version:
# upgrade_from:
questions:
- variable: "HOST_LABEL"
label: "Host Label Key/Value Pair"
description: |
The Label Key/Value pair of the host which containers should be deployed
default: "host.id=Host1"
required: false
type: string
- variable: "TRAEFIK_HOST"
label: "Public Host Domain"
description: |
The host that Traefik will use to provide public access.
Only one domain is allowed by Wiki.js
default: "subdomain.domain.tld"
required: true
type: string
- variable: "ADMIN_EMAIL"
label: "Administrator Email"
description: |
The email address for the main administrator
default: "user@tld.com"
required: true
type: string
- variable: "DATA_DIR"
label: "Data Directory"
description: |
The directory to store persistent data for the stack.
default: "Personal/Wiki.js"
required: true
type: string

View File

@@ -0,0 +1,3 @@
# Wiki.js (v1)
Default admin password: "admin123"

View File

@@ -0,0 +1,76 @@
version: '2'
services:
postgres:
image: postgres:9-alpine
dns: # Using Cloudflare DNS
- 1.1.1.1
- 1.0.0.1
- 2606:4700:4700::1111
- 2606:4700:4700::1001
environment:
POSTGRES_DB: wikijs
POSTGRES_PASSWORD: ${DB_PASS}
POSTGRES_USER: wikijs_user
labels:
io.rancher.container.pull_image: always
{{- if .Values.HOST_LABEL}}
io.rancher.scheduler.affinity:host_label: ${HOST_LABEL}
{{- end}}
traefik.enable: false
restart: on-failure
volumes:
- /etc/localtime:/etc/localtime:ro # Syncronize time of container with the host system
- /etc/timezone:/etc/timezone:ro # Syncronize timezone of container with the host system
- /Persistent/${DATA_DIR}/Database/Data:/var/lib/postgresql/data
wikijs:
image: requarks/wiki:2.0 # v1 Only
dns: # Using Cloudflare DNS
- 1.1.1.1
- 1.0.0.1
- 2606:4700:4700::1111
- 2606:4700:4700::1001
environment:
DB_TYPE: postgres
DB_HOST: postgres
DB_PORT: 5432
DB_USER: wikijs_user
DB_PASS: ${DB_PASS}
DB_NAME: wikijs
labels:
io.rancher.container.pull_image: always
{{- if .Values.HOST_LABEL}}
io.rancher.scheduler.affinity:host_label: ${HOST_LABEL}
{{- end}}
### Begin Traefik Configuration
traefik.enable: true
# Routers
traefik.http.routers.{{.Stack.Name}}-router-http.entrypoints: http
traefik.http.routers.{{.Stack.Name}}-router-http.rule: Host(`${TRAEFIK_HOST}`)
traefik.http.routers.{{.Stack.Name}}-router-http.middlewares: {{.Stack.Name}}-redirectHttp
traefik.http.routers.{{.Stack.Name}}-router-http.service: {{.Stack.Name}}-service-http
traefik.http.routers.{{.Stack.Name}}-router-https.entrypoints: https
traefik.http.routers.{{.Stack.Name}}-router-https.rule: Host(`${TRAEFIK_HOST}`)
traefik.http.routers.{{.Stack.Name}}-router-https.tls: true
traefik.http.routers.{{.Stack.Name}}-router-https.tls.certresolver: letsencrypt
traefik.http.routers.{{.Stack.Name}}-router-https.middlewares: {{.Stack.Name}}-security
traefik.http.routers.{{.Stack.Name}}-router-https.service: {{.Stack.Name}}-service-http
# Middlewares
traefik.http.middlewares.{{.Stack.Name}}-redirectHttp.redirectscheme.permanent: true
traefik.http.middlewares.{{.Stack.Name}}-redirectHttp.redirectscheme.scheme: https
traefik.http.middlewares.{{.Stack.Name}}-security.headers.forceSTSHeader: true
traefik.http.middlewares.{{.Stack.Name}}-security.headers.referrerPolicy: no-referrer # Prevents leaking of referer information
traefik.http.middlewares.{{.Stack.Name}}-security.headers.sslredirect: true # Maybe good for redundancy?
traefik.http.middlewares.{{.Stack.Name}}-security.headers.stsIncludeSubdomains: true
traefik.http.middlewares.{{.Stack.Name}}-security.headers.stsPreload: true
traefik.http.middlewares.{{.Stack.Name}}-security.headers.stsSeconds: "15552000"
# Services
traefik.http.services.{{.Stack.Name}}-service-http.loadbalancer.passhostheader: true
traefik.http.services.{{.Stack.Name}}-service-http.loadbalancer.server.port: "3000"
### End Traefik Configuration
links:
- postgres
restart: on-failure
volumes:
- /etc/localtime:/etc/localtime:ro # Syncronize time of container with the host system
- /etc/timezone:/etc/timezone:ro # Syncronize timezone of container with the host system

View File

@@ -0,0 +1,42 @@
version: '2'
catalog:
name: Wiki.js
version: 2.0-latest
# description:
# minimum_rancher_version:
# maximum_rancher_version:
# upgrade_from:
questions:
- variable: "HOST_LABEL"
label: "Host Label Key/Value Pair"
description: |
The Label Key/Value pair of the host which containers should be deployed
default: "host.id=Host1"
required: false
type: string
- variable: "TRAEFIK_HOST"
label: "Public Host Domain"
description: |
The host that Traefik will use to provide public access.
Only one domain is allowed by Wiki.js
default: "subdomain.domain.tld"
required: true
type: string
- variable: "DB_PASS"
label: "Database Password"
description: |
A secure password to be used by the "wikijs_user" database user.
# default:
required: true
type: password
- variable: "DATA_DIR"
label: "Data Directory"
description: |
The directory to store persistent data for the stack.
default: "Personal/Wiki.js"
required: true
type: string

View File

@@ -0,0 +1,8 @@
name: Wiki.js
description: |
version: 2.0-latest
category: Wiki
maintainer: WilliamMiceli
# license:
# projectURL: