From b01f9ebb01cebb1b817b637586f67a7b9f429239 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Sat, 23 Nov 2019 23:28:54 -0500 Subject: [PATCH] Created separate template for v2 --- README.md | 6 +- templates/{Wiki.js-v1 => Wiki.js}/0/README.md | 0 .../0/docker-compose.yml | 2 +- .../0/rancher-compose.yml | 4 +- templates/Wiki.js/1/README.md | 3 + templates/Wiki.js/1/docker-compose.yml | 76 +++++++++++++++++++ templates/Wiki.js/1/rancher-compose.yml | 42 ++++++++++ templates/{Wiki.js-v1 => Wiki.js}/config.yml | 4 +- 8 files changed, 130 insertions(+), 7 deletions(-) rename templates/{Wiki.js-v1 => Wiki.js}/0/README.md (100%) rename templates/{Wiki.js-v1 => Wiki.js}/0/docker-compose.yml (98%) rename templates/{Wiki.js-v1 => Wiki.js}/0/rancher-compose.yml (96%) create mode 100644 templates/Wiki.js/1/README.md create mode 100644 templates/Wiki.js/1/docker-compose.yml create mode 100644 templates/Wiki.js/1/rancher-compose.yml rename templates/{Wiki.js-v1 => Wiki.js}/config.yml (70%) diff --git a/README.md b/README.md index 4429c50..85b7769 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ My personal rancher catalog to make my own life just a little bit easier. Hopefully it can also be of use to others as well! +I'll generally only keep the latest version of templates up to date, just FYI. + ## TODO List - Finish what I've started @@ -37,13 +39,13 @@ Hopefully it can also be of use to others as well! - [x] OpenProject ([Docker Hub](https://hub.docker.com/r/openproject/community) | [Website](https://www.openproject.org/)) - [x] PHPMyAdmin ([Docker Hub](https://hub.docker.com/r/phpmyadmin/phpmyadmin) | [Website](https://www.phpmyadmin.net/)) - [ ] PostgreSQL ([Docker Hub](https://hub.docker.com/_/postgres) | [Website](https://www.postgresql.org/)) -- [ ] Redis ([Docker Hub](https://hub.docker.com/_/redis) | [Website](https://redis.io/)) +- [x] Redis ([Docker Hub](https://hub.docker.com/_/redis) | [Website](https://redis.io/)) - [ ] Redmine ([Docker Hub](https://hub.docker.com/_/redmine) | [Website](http://www.redmine.org/)) - [ ] Rocket.Chat ([Docker Hub](https://hub.docker.com/r/rocketchat/rocket.chat) | [Website](https://rocket.chat/)) - [x] Snipe-IT ([Docker Hub](https://hub.docker.com/r/snipe/snipe-it) | [Website](https://snipeitapp.com/)) - [ ] sysPass ([Docker Hub](https://hub.docker.com/r/syspass/syspass) | [Website](https://www.syspass.org/en)) - [x] Traefik ([Docker Hub](https://hub.docker.com/_/traefik) | [Website](https://traefik.io/)) -- [x] Wiki.js v1 ([Docker Hub](https://hub.docker.com/r/requarks/wiki/) | [Website](https://wiki.js.org/)) +- [x] Wiki.js ([Docker Hub](https://hub.docker.com/r/requarks/wiki/) | [Website](https://wiki.js.org/)) - [x] WordPress ([Docker Hub](https://hub.docker.com/_/wordpress) | [Website](https://wordpress.com/)) ### Will Complete at a Later Date diff --git a/templates/Wiki.js-v1/0/README.md b/templates/Wiki.js/0/README.md similarity index 100% rename from templates/Wiki.js-v1/0/README.md rename to templates/Wiki.js/0/README.md diff --git a/templates/Wiki.js-v1/0/docker-compose.yml b/templates/Wiki.js/0/docker-compose.yml similarity index 98% rename from templates/Wiki.js-v1/0/docker-compose.yml rename to templates/Wiki.js/0/docker-compose.yml index da8056a..475f685 100644 --- a/templates/Wiki.js-v1/0/docker-compose.yml +++ b/templates/Wiki.js/0/docker-compose.yml @@ -24,7 +24,7 @@ services: - /Persistent/${DATA_DIR}/Database/Data:/data/db - /Persistent/${DATA_DIR}/Database/Dump:/dump wikijs: - image: requarks/wiki:latest # v1 Only + image: requarks/wiki:1.0 dns: # Using Cloudflare DNS - 1.1.1.1 - 1.0.0.1 diff --git a/templates/Wiki.js-v1/0/rancher-compose.yml b/templates/Wiki.js/0/rancher-compose.yml similarity index 96% rename from templates/Wiki.js-v1/0/rancher-compose.yml rename to templates/Wiki.js/0/rancher-compose.yml index dcae4dc..5932d60 100644 --- a/templates/Wiki.js-v1/0/rancher-compose.yml +++ b/templates/Wiki.js/0/rancher-compose.yml @@ -1,7 +1,7 @@ version: '2' catalog: - name: Wiki.js (v1) - version: latest + name: Wiki.js + version: 1.0 # description: # minimum_rancher_version: # maximum_rancher_version: diff --git a/templates/Wiki.js/1/README.md b/templates/Wiki.js/1/README.md new file mode 100644 index 0000000..9407c84 --- /dev/null +++ b/templates/Wiki.js/1/README.md @@ -0,0 +1,3 @@ +# Wiki.js (v1) + +Default admin password: "admin123" \ No newline at end of file diff --git a/templates/Wiki.js/1/docker-compose.yml b/templates/Wiki.js/1/docker-compose.yml new file mode 100644 index 0000000..e9c99b6 --- /dev/null +++ b/templates/Wiki.js/1/docker-compose.yml @@ -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 diff --git a/templates/Wiki.js/1/rancher-compose.yml b/templates/Wiki.js/1/rancher-compose.yml new file mode 100644 index 0000000..5dcfa5b --- /dev/null +++ b/templates/Wiki.js/1/rancher-compose.yml @@ -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 \ No newline at end of file diff --git a/templates/Wiki.js-v1/config.yml b/templates/Wiki.js/config.yml similarity index 70% rename from templates/Wiki.js-v1/config.yml rename to templates/Wiki.js/config.yml index 5bd5b6d..8f6dc5c 100644 --- a/templates/Wiki.js-v1/config.yml +++ b/templates/Wiki.js/config.yml @@ -1,7 +1,7 @@ -name: Wiki.js (v1) +name: Wiki.js description: | -version: latest +version: 2.0-latest category: Wiki maintainer: WilliamMiceli # license: