From 9a2a40eac2ddbd7a320642de629d89b131ee541c Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Sat, 27 Jul 2019 15:25:39 -0400 Subject: [PATCH 01/40] Bugfix testing --- templates/GitLab-Runner/0/docker-compose.yml | 12 ++++++------ templates/GitLab-Runner/0/rancher-compose.yml | 8 ++++++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index 8816116..805489c 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -41,7 +41,9 @@ services: traefik.enable: false volumes: - /var/run/docker.sock:/var/run/docker.sock - - GitLab-Runner:/etc/gitlab-runner + - /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}:/etc/gitlab-runner gitlab-runner: image: gitlab/gitlab-runner:alpine # Alpine Linux image is designed to use only Docker as the method of spawning runners command: @@ -61,8 +63,6 @@ services: restart: always volumes: - /var/run/docker.sock:/var/run/docker.sock - - GitLab-Runner:/etc/gitlab-runner - -volumes: - GitLab-Runner: - driver: local \ No newline at end of file + - /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}:/etc/gitlab-runner \ No newline at end of file diff --git a/templates/GitLab-Runner/0/rancher-compose.yml b/templates/GitLab-Runner/0/rancher-compose.yml index 8140b66..7c97e45 100644 --- a/templates/GitLab-Runner/0/rancher-compose.yml +++ b/templates/GitLab-Runner/0/rancher-compose.yml @@ -64,4 +64,12 @@ catalog: (Optional) The local IP address of the GitLab service. # default: "" required: false + type: string + + - variable: "DATA_DIR" + label: "Data Directory" + description: | + The directory to store persistent data for the stack. + default: "Personal/GitLab-Runner" + required: true type: string \ No newline at end of file From 9cce1d0015bf8856d47bb0ca5f2ce818f6db1c26 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Mon, 29 Jul 2019 11:50:31 -0400 Subject: [PATCH 02/40] Removed segmentation and added STSIncludeSubdomains --- templates/Nextcloud/0/docker-compose.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/templates/Nextcloud/0/docker-compose.yml b/templates/Nextcloud/0/docker-compose.yml index 046631b..2fb3d52 100644 --- a/templates/Nextcloud/0/docker-compose.yml +++ b/templates/Nextcloud/0/docker-compose.yml @@ -41,17 +41,18 @@ services: {{- end}} # io.rancher.sidekicks: cron traefik.enable: true - ### Start Nextcloud Segment - traefik.nextcloud.frontend.entryPoints: http,https - traefik.nextcloud.frontend.headers.forceSTSHeader: true - traefik.nextcloud.frontend.headers.referrerPolicy: no-referrer # Security enhancement (Prevents leaking of referer information) - traefik.nextcloud.frontend.headers.SSLRedirect: true - traefik.nextcloud.frontend.headers.STSPreload: true - traefik.nextcloud.frontend.headers.STSSeconds: 15552000 - traefik.nextcloud.frontend.passHostHeader: true - traefik.nextcloud.frontend.rule: Host:${TRAEFIK_HOST} - traefik.nextcloud.port: "80" - ### End Nextcloud Segment + ### Start Web UI Segment + traefik.frontend.entryPoints: http,https + traefik.frontend.headers.forceSTSHeader: true + traefik.frontend.headers.referrerPolicy: no-referrer # Security enhancement (Prevents leaking of referer information) + traefik.frontend.headers.SSLRedirect: true + traefik.frontend.headers.STSIncludeSubdomains: true + traefik.frontend.headers.STSPreload: true + traefik.frontend.headers.STSSeconds: 15552000 + traefik.frontend.passHostHeader: true + traefik.frontend.rule: Host:${TRAEFIK_HOST} + traefik.port: "80" + ### End Web UI Segment links: - mysql {{- if eq .Values.REDIS "true"}} From 259fb810d6a7f29676733fc4432cf5f2e9fa92af Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Mon, 29 Jul 2019 11:51:05 -0400 Subject: [PATCH 03/40] Added redirect for CalDAV/CardDAV service discovery --- templates/Nextcloud/0/docker-compose.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/Nextcloud/0/docker-compose.yml b/templates/Nextcloud/0/docker-compose.yml index 2fb3d52..beb12b8 100644 --- a/templates/Nextcloud/0/docker-compose.yml +++ b/templates/Nextcloud/0/docker-compose.yml @@ -53,6 +53,11 @@ services: traefik.frontend.rule: Host:${TRAEFIK_HOST} traefik.port: "80" ### End Web UI Segment + ### Start CalDAV/CardDAV Redirect Segment + traefik.frontend.redirect.permanent: true + traefik.frontend.redirect.regex: https://(.*)/.well-known/(card|cal)dav + traefik.frontend.redirect.replacement: https://${TRAEFIK_HOST}/remote.php/dav/ + ### End CalDAV/CardDAV Redirect Segment links: - mysql {{- if eq .Values.REDIS "true"}} From 5f00c3509e6574260fb96f7e48a7f2a1e556c7b5 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Mon, 29 Jul 2019 11:51:20 -0400 Subject: [PATCH 04/40] Some ideas for later --- templates/Nextcloud/0/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/Nextcloud/0/README.md b/templates/Nextcloud/0/README.md index 61406ce..1114dd5 100644 --- a/templates/Nextcloud/0/README.md +++ b/templates/Nextcloud/0/README.md @@ -23,4 +23,8 @@ You can monitor if it is working by opening a shell terminal on your Redis conta * Explain how to manually setup Redis * Fix Cron container, does not yet properly execute yet * Better setup trusted_proxies - * [Documentation Reference](https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/reverse_proxy_configuration.html?highlight=reverse%20proxy) \ No newline at end of file + * [Documentation Reference](https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/reverse_proxy_configuration.html?highlight=reverse%20proxy) +* Create my own Nextcloud image and make the following changes: + * Add the Redis config + * Add the reverse proxy config + * Have the entrypoint automatically run the "php occ db:add-missing-indices" \ No newline at end of file From 98d3dff8eab786717ef9da3e8ef7fc67adb6c9a3 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Mon, 29 Jul 2019 11:51:45 -0400 Subject: [PATCH 05/40] Tells Nextcloud that it is behind a reverse proxy --- templates/Nextcloud/0/reverseproxy.config.php | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 templates/Nextcloud/0/reverseproxy.config.php diff --git a/templates/Nextcloud/0/reverseproxy.config.php b/templates/Nextcloud/0/reverseproxy.config.php new file mode 100644 index 0000000..0d24671 --- /dev/null +++ b/templates/Nextcloud/0/reverseproxy.config.php @@ -0,0 +1,4 @@ + ['10.42.0.0/16'], // 10.42.0.0/16 is the default Rancher managed subnet +); \ No newline at end of file From 822e3a6ebc6dbe896369461307ef7d51aed912ff Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Mon, 29 Jul 2019 11:52:53 -0400 Subject: [PATCH 06/40] Fixed basic files --- templates/Matomo/0/README.md | 1 + templates/Matomo/config.yml | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 templates/Matomo/0/README.md create mode 100644 templates/Matomo/config.yml diff --git a/templates/Matomo/0/README.md b/templates/Matomo/0/README.md new file mode 100644 index 0000000..8607f11 --- /dev/null +++ b/templates/Matomo/0/README.md @@ -0,0 +1 @@ +# Matomo diff --git a/templates/Matomo/config.yml b/templates/Matomo/config.yml new file mode 100644 index 0000000..154f602 --- /dev/null +++ b/templates/Matomo/config.yml @@ -0,0 +1,8 @@ +name: Matomo +description: | + +version: latest +# category: +maintainer: WilliamMiceli +# license: +# projectURL: \ No newline at end of file From 7c9e21c9c852f42026bd5c575b0d686fecf87dc4 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Mon, 29 Jul 2019 11:53:11 -0400 Subject: [PATCH 07/40] Unfinished, still WIP --- templates/Matomo/0/docker-compose.yml | 65 ++++++++++++++++++++++++++ templates/Matomo/0/rancher-compose.yml | 49 +++++++++++++++++++ 2 files changed, 114 insertions(+) create mode 100644 templates/Matomo/0/docker-compose.yml create mode 100644 templates/Matomo/0/rancher-compose.yml diff --git a/templates/Matomo/0/docker-compose.yml b/templates/Matomo/0/docker-compose.yml new file mode 100644 index 0000000..9a99d0b --- /dev/null +++ b/templates/Matomo/0/docker-compose.yml @@ -0,0 +1,65 @@ +version: '2' + +services: + matomo: + image: matomo:latest + dns: # Using Cloudflare DNS + - 1.1.1.1 + - 1.0.0.1 + - 2606:4700:4700::1111 + - 2606:4700:4700::1001 + environment: + labels: + io.rancher.container.pull_image: always + {{- if .Values.HOST_LABEL}} + io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} + {{- end}} + traefik.enable: true + ### Start Web Segment + traefik.frontend.entryPoints: http,https + traefik.frontend.headers.forceSTSHeader: true + traefik.frontend.headers.referrerPolicy: no-referrer # Security enhancement (Prevents leaking of referer information) + traefik.frontend.headers.SSLRedirect: true + traefik.frontend.headers.STSPreload: true + traefik.frontend.headers.STSSeconds: 15552000 + traefik.frontend.passHostHeader: true + traefik.frontend.rule: Host:${TRAEFIK_HOST} + traefik.port: "80" + ### End Web Segment + links: + - mysql + {{- if eq .Values.REDIS "true"}} + - redis + {{- end}} + 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}/Apps:/var/www/html/custom_apps # Nextcloud apps + - /Persistent/${DATA_DIR}/Configuration:/var/www/html/config # Nextcloud configuration files + - /Persistent/${DATA_DIR}/Nextcloud:/var/www/html # Nextcloud site + - /Persistent/${DATA_DIR}/UserData:/var/www/html/data # Users' data file + mariadb: + image: mariadb + command: --max-allowed-packet=64MB + dns: # Using Cloudflare DNS + - 1.1.1.1 + - 1.0.0.1 + - 2606:4700:4700::1111 + - 2606:4700:4700::1001 + environment: + MYSQL_DATABASE: matomo_db + MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS} + MYSQL_USER: matomo_user + MYSQL_PASSWORD: ${DB_USER_PASS} + 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:/var/lib/mysql diff --git a/templates/Matomo/0/rancher-compose.yml b/templates/Matomo/0/rancher-compose.yml new file mode 100644 index 0000000..fcfd24e --- /dev/null +++ b/templates/Matomo/0/rancher-compose.yml @@ -0,0 +1,49 @@ +version: '2' +catalog: + name: Matomo + version: 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. + default: "subdomain.domain.tld" + required: true + type: string + + - variable: "DB_ROOT_PASS" + label: "Database Root Password" + description: | + A secure password to be used by the "root" database user. + # default: + required: true + type: password + + - variable: "DB_USER_PASS" + label: "Database User Password" + description: | + A secure password to be used by the "nextcloud_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/Matomo" + required: true + type: string \ No newline at end of file From 319227a2f6a4a19cd9d112f3d12a85a75771fa3d Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Wed, 31 Jul 2019 21:01:16 -0400 Subject: [PATCH 08/40] Docker socket no longer possible on GitLab Runner v11.11+; Changed back to ephemeral volumes --- templates/GitLab-Runner/0/docker-compose.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index 805489c..136399c 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -40,10 +40,9 @@ services: {{- end}} traefik.enable: false volumes: - - /var/run/docker.sock:/var/run/docker.sock - /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}:/etc/gitlab-runner + - GitLab-Runner:/etc/gitlab-runner gitlab-runner: image: gitlab/gitlab-runner:alpine # Alpine Linux image is designed to use only Docker as the method of spawning runners command: @@ -62,7 +61,10 @@ services: privileged: true restart: always volumes: - - /var/run/docker.sock:/var/run/docker.sock - /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}:/etc/gitlab-runner \ No newline at end of file + - GitLab-Runner:/etc/gitlab-runner + +volumes: + GitLab-Runner: + driver: local From ca4f83248ecc70073e9258643f2180c484f6f22e Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Wed, 31 Jul 2019 21:08:07 -0400 Subject: [PATCH 09/40] Testing if this can be passed as CLI argument --- templates/GitLab-Runner/0/docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index 136399c..b0eb2bc 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -28,6 +28,8 @@ services: - --docker-extra-hosts - "gitlab:${GITLAB_IP}" {{- end}} + - --host + - "tcp://docker:2375/" {{- if .Values.GITLAB_LINK}} external_links: - ${GITLAB_LINK}:gitlab From 5e7875691da492e15866a89bc36efe889578ede9 Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Wed, 31 Jul 2019 21:18:32 -0400 Subject: [PATCH 10/40] Fixed typo --- templates/GitLab-Runner/0/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index b0eb2bc..4813b63 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -28,7 +28,7 @@ services: - --docker-extra-hosts - "gitlab:${GITLAB_IP}" {{- end}} - - --host + - --docker-host - "tcp://docker:2375/" {{- if .Values.GITLAB_LINK}} external_links: From 1670df51efa3241c1b4c6c4194f9563c7f75e8ec Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Wed, 31 Jul 2019 21:28:20 -0400 Subject: [PATCH 11/40] Making things a bit more concise --- templates/GitLab-Runner/0/docker-compose.yml | 21 +++++++------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index 4813b63..0e358a8 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -6,30 +6,23 @@ services: command: - register - --non-interactive - - --url - - ${GITLAB_URL} - - --registration-token - - ${GITLAB_TOKEN} - - --executor - - "docker" + - --url ${GITLAB_URL} + - --registration-token ${GITLAB_TOKEN} + - --executor "docker" {{- if .Values.GITLAB_RUNNER_DESCRIPTION}} - - --description - - ${GITLAB_RUNNER_DESCRIPTION} + - --description ${GITLAB_RUNNER_DESCRIPTION} {{- end}} {{- if .Values.GITLAB_TAGS}} - - --tag-list - - ${GITLAB_TAGS} + - --tag-list ${GITLAB_TAGS} {{- end}} - --locked=false - --docker-image - docker:latest - --docker-privileged {{- if .Values.GITLAB_IP}} - - --docker-extra-hosts - - "gitlab:${GITLAB_IP}" + - --docker-extra-hosts "gitlab:${GITLAB_IP}" {{- end}} - - --docker-host - - "tcp://docker:2375/" + - --docker-host "tcp://docker:2375/" {{- if .Values.GITLAB_LINK}} external_links: - ${GITLAB_LINK}:gitlab From 41b3249b93545f054464dcb350710b9f8b2581c3 Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Wed, 31 Jul 2019 21:30:32 -0400 Subject: [PATCH 12/40] Testing fix --- templates/GitLab-Runner/0/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index 0e358a8..b1ed556 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -6,7 +6,7 @@ services: command: - register - --non-interactive - - --url ${GITLAB_URL} + - "--url ${GITLAB_URL}" - --registration-token ${GITLAB_TOKEN} - --executor "docker" {{- if .Values.GITLAB_RUNNER_DESCRIPTION}} From fb71ea3e399029cb3d97ae30909d5f89b0bc92dc Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Wed, 31 Jul 2019 21:36:38 -0400 Subject: [PATCH 13/40] Testing --- templates/GitLab-Runner/0/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index b1ed556..efb80da 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -6,7 +6,7 @@ services: command: - register - --non-interactive - - "--url ${GITLAB_URL}" + - '--url ${GITLAB_URL}' - --registration-token ${GITLAB_TOKEN} - --executor "docker" {{- if .Values.GITLAB_RUNNER_DESCRIPTION}} From 527bc5670961c91e480bd1497ff27f50169a7442 Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Wed, 31 Jul 2019 21:38:40 -0400 Subject: [PATCH 14/40] Testing --- templates/GitLab-Runner/0/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index efb80da..5509b7c 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -6,7 +6,7 @@ services: command: - register - --non-interactive - - '--url ${GITLAB_URL}' + - \"--url ${GITLAB_URL}\" - --registration-token ${GITLAB_TOKEN} - --executor "docker" {{- if .Values.GITLAB_RUNNER_DESCRIPTION}} From 132ace8530a5fe92a6f5433b01dbce85a4e2ae6a Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Thu, 1 Aug 2019 14:47:51 -0400 Subject: [PATCH 15/40] Testing using environment variables instead --- templates/GitLab-Runner/0/docker-compose.yml | 31 ++++++++------------ 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index 5509b7c..6b9cb4a 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -5,25 +5,18 @@ services: image: gitlab/gitlab-runner:alpine # Alpine Linux image is designed to use only Docker as the method of spawning runners command: - register - - --non-interactive - - \"--url ${GITLAB_URL}\" - - --registration-token ${GITLAB_TOKEN} - - --executor "docker" - {{- if .Values.GITLAB_RUNNER_DESCRIPTION}} - - --description ${GITLAB_RUNNER_DESCRIPTION} - {{- end}} - {{- if .Values.GITLAB_TAGS}} - - --tag-list ${GITLAB_TAGS} - {{- end}} - - --locked=false - - --docker-image - - docker:latest - - --docker-privileged - {{- if .Values.GITLAB_IP}} - - --docker-extra-hosts "gitlab:${GITLAB_IP}" - {{- end}} - - --docker-host "tcp://docker:2375/" - {{- if .Values.GITLAB_LINK}} + environment: + REGISTER_NON_INTERACTIVE: true + CI_SERVER_URL: http://gitlab/ + REGISTRATION_TOKEN: ${GITLAB_TOKEN} + RUNNER_EXECUTOR: docker + RUNNER_NAME: ${GITLAB_RUNNER_DESCRIPTION} + RUNNER_TAG_LIST: ${GITLAB_TAGS} + REGISTER_LOCKED: false + DOCKER_IMAGE: docker:latest + DOCKER_PRIVILEGED: true + DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} + DOCKER_HOST: tcp://docker:2375/ external_links: - ${GITLAB_LINK}:gitlab {{- end}} From a96662613adc42f6c2f821c734fa24af41400dd5 Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Thu, 1 Aug 2019 14:51:25 -0400 Subject: [PATCH 16/40] Fixed minor issue --- templates/GitLab-Runner/0/docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index 6b9cb4a..f55ebea 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -18,6 +18,7 @@ services: DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} DOCKER_HOST: tcp://docker:2375/ external_links: + {{- if .Values.GITLAB_LINK}} - ${GITLAB_LINK}:gitlab {{- end}} labels: From e1ae634cc92ae1124e69c04b78f2c90ec3152ba7 Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Thu, 1 Aug 2019 15:10:12 -0400 Subject: [PATCH 17/40] Added comments --- templates/GitLab-Runner/0/docker-compose.yml | 24 ++++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index f55ebea..f083973 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -5,18 +5,18 @@ services: image: gitlab/gitlab-runner:alpine # Alpine Linux image is designed to use only Docker as the method of spawning runners command: - register - environment: - REGISTER_NON_INTERACTIVE: true - CI_SERVER_URL: http://gitlab/ - REGISTRATION_TOKEN: ${GITLAB_TOKEN} - RUNNER_EXECUTOR: docker - RUNNER_NAME: ${GITLAB_RUNNER_DESCRIPTION} - RUNNER_TAG_LIST: ${GITLAB_TAGS} - REGISTER_LOCKED: false - DOCKER_IMAGE: docker:latest - DOCKER_PRIVILEGED: true - DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} - DOCKER_HOST: tcp://docker:2375/ + environment: # Options can be found by running "gitlab-runner register". More info found at https://docs.gitlab.com/runner/configuration/advanced-configuration.html + REGISTER_NON_INTERACTIVE: true # Run registration unattended + CI_SERVER_URL: http://gitlab/ # Runner URL + REGISTRATION_TOKEN: ${GITLAB_TOKEN} # Runner's registration token + RUNNER_EXECUTOR: docker # Select executor, eg. shell, docker, etc. + RUNNER_NAME: ${GITLAB_RUNNER_DESCRIPTION} # Runner name + RUNNER_TAG_LIST: ${GITLAB_TAGS} # Tag list + REGISTER_LOCKED: false # Lock Runner for current project + DOCKER_IMAGE: docker:latest # Docker image to be used + DOCKER_PRIVILEGED: true # Give extended privileges to container + DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} # Add a custom host-to-IP mapping + DOCKER_HOST: tcp://docker:2375/ # Docker daemon address external_links: {{- if .Values.GITLAB_LINK}} - ${GITLAB_LINK}:gitlab From bb795ce3a1083919eb911339d400e73e7d273c2d Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Thu, 1 Aug 2019 15:10:37 -0400 Subject: [PATCH 18/40] Testing without setting DOCKER_HOST --- templates/GitLab-Runner/0/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index f083973..677b74c 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -16,7 +16,7 @@ services: DOCKER_IMAGE: docker:latest # Docker image to be used DOCKER_PRIVILEGED: true # Give extended privileges to container DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} # Add a custom host-to-IP mapping - DOCKER_HOST: tcp://docker:2375/ # Docker daemon address + #DOCKER_HOST: tcp://docker:2375/ # Docker daemon address external_links: {{- if .Values.GITLAB_LINK}} - ${GITLAB_LINK}:gitlab From 0ed49af76407eecb41a8ab25148b59fe2c2ea1cb Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Thu, 1 Aug 2019 15:20:53 -0400 Subject: [PATCH 19/40] Persistent storage not needed --- templates/GitLab-Runner/0/rancher-compose.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/templates/GitLab-Runner/0/rancher-compose.yml b/templates/GitLab-Runner/0/rancher-compose.yml index 7c97e45..4782668 100644 --- a/templates/GitLab-Runner/0/rancher-compose.yml +++ b/templates/GitLab-Runner/0/rancher-compose.yml @@ -65,11 +65,3 @@ catalog: # default: "" required: false type: string - - - variable: "DATA_DIR" - label: "Data Directory" - description: | - The directory to store persistent data for the stack. - default: "Personal/GitLab-Runner" - required: true - type: string \ No newline at end of file From e48d06f2bc499f04f2d3ab47078c84887aed4df3 Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Thu, 1 Aug 2019 15:21:31 -0400 Subject: [PATCH 20/40] Trying localhost instead for DOCKER_HOST --- templates/GitLab-Runner/0/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index 677b74c..ba7101c 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -16,7 +16,7 @@ services: DOCKER_IMAGE: docker:latest # Docker image to be used DOCKER_PRIVILEGED: true # Give extended privileges to container DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} # Add a custom host-to-IP mapping - #DOCKER_HOST: tcp://docker:2375/ # Docker daemon address + DOCKER_HOST: tcp://localhost:2375 # Docker daemon address external_links: {{- if .Values.GITLAB_LINK}} - ${GITLAB_LINK}:gitlab From 61ce7b3abb208f858f99c952349f39e1e549fab0 Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Thu, 1 Aug 2019 15:30:11 -0400 Subject: [PATCH 21/40] Testing docker:2376 --- templates/GitLab-Runner/0/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index ba7101c..73720ac 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -16,7 +16,7 @@ services: DOCKER_IMAGE: docker:latest # Docker image to be used DOCKER_PRIVILEGED: true # Give extended privileges to container DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} # Add a custom host-to-IP mapping - DOCKER_HOST: tcp://localhost:2375 # Docker daemon address + DOCKER_HOST: tcp://docker:2376 # Docker daemon address external_links: {{- if .Values.GITLAB_LINK}} - ${GITLAB_LINK}:gitlab From ce16cbaed4d78e8ea7ebf6306fa57f38962b15ba Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Thu, 1 Aug 2019 15:32:02 -0400 Subject: [PATCH 22/40] Testing localhost:2376 --- templates/GitLab-Runner/0/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index 73720ac..91ed7b2 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -16,7 +16,7 @@ services: DOCKER_IMAGE: docker:latest # Docker image to be used DOCKER_PRIVILEGED: true # Give extended privileges to container DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} # Add a custom host-to-IP mapping - DOCKER_HOST: tcp://docker:2376 # Docker daemon address + DOCKER_HOST: tcp://localhost:2376 # Docker daemon address external_links: {{- if .Values.GITLAB_LINK}} - ${GITLAB_LINK}:gitlab From 5dd290bd2af07e47b4b30c42c0ef2c7fe6d0adc5 Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Thu, 1 Aug 2019 15:42:57 -0400 Subject: [PATCH 23/40] Hotfix testing --- templates/GitLab-Runner/0/docker-compose.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index 91ed7b2..118ef4d 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -16,7 +16,8 @@ services: DOCKER_IMAGE: docker:latest # Docker image to be used DOCKER_PRIVILEGED: true # Give extended privileges to container DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} # Add a custom host-to-IP mapping - DOCKER_HOST: tcp://localhost:2376 # Docker daemon address + DOCKER_HOST: tcp://localhost:2375 # Docker daemon address + DOCKER_TLS_CERTDIR: "" # HOTFIX external_links: {{- if .Values.GITLAB_LINK}} - ${GITLAB_LINK}:gitlab From da54439da34febc6da95e5fe47a2a36683ec1489 Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Thu, 1 Aug 2019 15:47:47 -0400 Subject: [PATCH 24/40] Testing --- templates/GitLab-Runner/0/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index 118ef4d..be57a80 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -16,7 +16,7 @@ services: DOCKER_IMAGE: docker:latest # Docker image to be used DOCKER_PRIVILEGED: true # Give extended privileges to container DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} # Add a custom host-to-IP mapping - DOCKER_HOST: tcp://localhost:2375 # Docker daemon address + DOCKER_HOST: tcp://docker:2375 # Docker daemon address DOCKER_TLS_CERTDIR: "" # HOTFIX external_links: {{- if .Values.GITLAB_LINK}} From f637583791964e881b90ebd6a4ca7d3f6e3406fe Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Thu, 1 Aug 2019 17:13:30 -0400 Subject: [PATCH 25/40] Testing --- templates/GitLab-Runner/0/docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index be57a80..56fb210 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -16,8 +16,8 @@ services: DOCKER_IMAGE: docker:latest # Docker image to be used DOCKER_PRIVILEGED: true # Give extended privileges to container DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} # Add a custom host-to-IP mapping - DOCKER_HOST: tcp://docker:2375 # Docker daemon address - DOCKER_TLS_CERTDIR: "" # HOTFIX + DOCKER_HOST: tcp://localhost:2375 # Docker daemon address + DOCKER_TLS_CERTDIR: "" # HOTFIX? external_links: {{- if .Values.GITLAB_LINK}} - ${GITLAB_LINK}:gitlab From 04aff6badcfcb88c3a4a1006836256a2dd59f517 Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Thu, 1 Aug 2019 17:15:42 -0400 Subject: [PATCH 26/40] Testing --- templates/GitLab-Runner/0/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index 56fb210..974507b 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -16,7 +16,7 @@ services: DOCKER_IMAGE: docker:latest # Docker image to be used DOCKER_PRIVILEGED: true # Give extended privileges to container DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} # Add a custom host-to-IP mapping - DOCKER_HOST: tcp://localhost:2375 # Docker daemon address + DOCKER_HOST: tcp://localhost:2376 # Docker daemon address DOCKER_TLS_CERTDIR: "" # HOTFIX? external_links: {{- if .Values.GITLAB_LINK}} From faaeea7f6aae4d5918af471751b732a8d2986643 Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Sat, 3 Aug 2019 18:44:42 -0400 Subject: [PATCH 27/40] Testing --- templates/GitLab-Runner/0/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index 974507b..bf8123e 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -16,7 +16,7 @@ services: DOCKER_IMAGE: docker:latest # Docker image to be used DOCKER_PRIVILEGED: true # Give extended privileges to container DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} # Add a custom host-to-IP mapping - DOCKER_HOST: tcp://localhost:2376 # Docker daemon address + DOCKER_HOST: tcp://docker:2375 # Docker daemon address DOCKER_TLS_CERTDIR: "" # HOTFIX? external_links: {{- if .Values.GITLAB_LINK}} From 2d3d6769154cf7ec687619530441325b823a5537 Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Sat, 3 Aug 2019 18:50:55 -0400 Subject: [PATCH 28/40] Testing --- templates/GitLab-Runner/0/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index bf8123e..56fb210 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -16,7 +16,7 @@ services: DOCKER_IMAGE: docker:latest # Docker image to be used DOCKER_PRIVILEGED: true # Give extended privileges to container DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} # Add a custom host-to-IP mapping - DOCKER_HOST: tcp://docker:2375 # Docker daemon address + DOCKER_HOST: tcp://localhost:2375 # Docker daemon address DOCKER_TLS_CERTDIR: "" # HOTFIX? external_links: {{- if .Values.GITLAB_LINK}} From d2b63fbeda5868424be0afa44e1934883900d32d Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Sat, 3 Aug 2019 19:01:09 -0400 Subject: [PATCH 29/40] Testing --- templates/GitLab-Runner/0/docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index 56fb210..ba7101c 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -17,7 +17,6 @@ services: DOCKER_PRIVILEGED: true # Give extended privileges to container DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} # Add a custom host-to-IP mapping DOCKER_HOST: tcp://localhost:2375 # Docker daemon address - DOCKER_TLS_CERTDIR: "" # HOTFIX? external_links: {{- if .Values.GITLAB_LINK}} - ${GITLAB_LINK}:gitlab From 2e32b3f7d856f8f468ba53c14ecafd2e54dd9da4 Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Sat, 3 Aug 2019 19:08:07 -0400 Subject: [PATCH 30/40] Testing --- templates/GitLab-Runner/0/docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index ba7101c..23a86ff 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -17,6 +17,7 @@ services: DOCKER_PRIVILEGED: true # Give extended privileges to container DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} # Add a custom host-to-IP mapping DOCKER_HOST: tcp://localhost:2375 # Docker daemon address + DOCKER_TLS_CERTDIR: "/certs" # Testing external_links: {{- if .Values.GITLAB_LINK}} - ${GITLAB_LINK}:gitlab From aac26f56a9f1875e2f8af0dcff7e257a1ff6521c Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Sat, 3 Aug 2019 19:09:34 -0400 Subject: [PATCH 31/40] Testing --- templates/GitLab-Runner/0/docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index 23a86ff..3b30f61 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -18,6 +18,7 @@ services: DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} # Add a custom host-to-IP mapping DOCKER_HOST: tcp://localhost:2375 # Docker daemon address DOCKER_TLS_CERTDIR: "/certs" # Testing + DOCKER_VOLUMES: "/certs/client" # Testing external_links: {{- if .Values.GITLAB_LINK}} - ${GITLAB_LINK}:gitlab From 2c1c9d8626e5addbbe86ca7bcb00546fd632ff4f Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Wed, 14 Aug 2019 20:51:31 -0400 Subject: [PATCH 32/40] Small wording fix --- templates/GitLab/0/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/GitLab/0/docker-compose.yml b/templates/GitLab/0/docker-compose.yml index 4a7c37c..2ec9407 100644 --- a/templates/GitLab/0/docker-compose.yml +++ b/templates/GitLab/0/docker-compose.yml @@ -12,7 +12,7 @@ services: GITLAB_OMNIBUS_CONFIG: | external_url 'https://${TRAEFIK_HOST}' gitlab_rails['gitlab_shell_ssh_port'] = 1022 - nginx['real_ip_trusted_addresses'] = [ '10.42.0.0/16' ] # 10.42.0.0/16 is the default Rancher managed subnet + nginx['real_ip_trusted_addresses'] = [ '10.42.0.0/16' ] # 10.42.0.0/16 is the default Rancher-managed subnet nginx['listen_port'] = 80 # Using HTTP between the Traefik container and GitLab nginx['listen_https'] = false # Traefik is handling HTTPS on outside hostname: ${TRAEFIK_HOST} From 4760ee782df4991731a3bbeda5670b669670d361 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Wed, 14 Aug 2019 20:51:54 -0400 Subject: [PATCH 33/40] Added initial config template for Mautic --- templates/Mautic/0/README.md | 30 ++++++++++ templates/Mautic/0/docker-compose.yml | 66 ++++++++++++++++++++++ templates/Mautic/0/rancher-compose.yml | 49 ++++++++++++++++ templates/Mautic/catalogIcon-nextcloud.svg | 1 + templates/Mautic/config.yml | 8 +++ 5 files changed, 154 insertions(+) create mode 100644 templates/Mautic/0/README.md create mode 100644 templates/Mautic/0/docker-compose.yml create mode 100644 templates/Mautic/0/rancher-compose.yml create mode 100644 templates/Mautic/catalogIcon-nextcloud.svg create mode 100644 templates/Mautic/config.yml diff --git a/templates/Mautic/0/README.md b/templates/Mautic/0/README.md new file mode 100644 index 0000000..1114dd5 --- /dev/null +++ b/templates/Mautic/0/README.md @@ -0,0 +1,30 @@ +# Nextcloud + +Nextcloud offers industry-leading on-premises file sync and online collaboration technology. Our expertise is in combining the convenience and ease of use of consumer-grade solutions like Dropbox and Google Drive with the security, privacy and control business needs. + +Our self-hosted solutions ensure you know where data is, who has access, and that even meta-data does not leak. + +## Pre-Requisites + +* Traefik deployed + +## Useful Tools + +* [Official Security Check](https://scan.nextcloud.com/) + +## Easy Redis Setup + +Copy the "redis.config.php" file into your Configuration directory. +You may need to restart your stack for it to pick up. +You can monitor if it is working by opening a shell terminal on your Redis container and using `redis-cli MONITOR` + +## To-Do's + +* Explain how to manually setup Redis +* Fix Cron container, does not yet properly execute yet +* Better setup trusted_proxies + * [Documentation Reference](https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/reverse_proxy_configuration.html?highlight=reverse%20proxy) +* Create my own Nextcloud image and make the following changes: + * Add the Redis config + * Add the reverse proxy config + * Have the entrypoint automatically run the "php occ db:add-missing-indices" \ No newline at end of file diff --git a/templates/Mautic/0/docker-compose.yml b/templates/Mautic/0/docker-compose.yml new file mode 100644 index 0000000..a32a861 --- /dev/null +++ b/templates/Mautic/0/docker-compose.yml @@ -0,0 +1,66 @@ +version: '2' + +services: + mautic: + image: mautic/mautic:latest + dns: # Using Cloudflare DNS + - 1.1.1.1 + - 1.0.0.1 + - 2606:4700:4700::1111 + - 2606:4700:4700::1001 + environment: + MAUTIC_DB_HOST: mysql + MAUTIC_DB_USER: mautic_user + MAUTIC_DB_PASSWORD: ${DB_USER_PASS} + MAUTIC_DB_NAME: mautic_db + MAUTIC_TRUSTED_PROXIES: 10.42.0.0/16 # 10.42.0.0/16 is the default Rancher-managed subnet + labels: + io.rancher.container.pull_image: always + {{- if .Values.HOST_LABEL}} + io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} + {{- end}} +# io.rancher.sidekicks: cron + traefik.enable: true + ### Start Web UI Segment + traefik.frontend.entryPoints: http,https + traefik.frontend.headers.forceSTSHeader: true + traefik.frontend.headers.referrerPolicy: no-referrer # Security enhancement (Prevents leaking of referer information) + traefik.frontend.headers.SSLRedirect: true + traefik.frontend.headers.STSIncludeSubdomains: true + traefik.frontend.headers.STSPreload: true + traefik.frontend.headers.STSSeconds: 15552000 + traefik.frontend.passHostHeader: true + traefik.frontend.rule: Host:${TRAEFIK_HOST} + traefik.port: "80" + ### End Web UI Segment + links: + - mysql + 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}:/var/www/html # Mautic site + mysql: + image: mysql:5.6 + dns: # Using Cloudflare DNS + - 1.1.1.1 + - 1.0.0.1 + - 2606:4700:4700::1111 + - 2606:4700:4700::1001 + environment: + MYSQL_DATABASE: mautic_db + MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS} + MYSQL_USER: mautic_user + MYSQL_PASSWORD: ${DB_USER_PASS} + 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:/var/lib/mysql + diff --git a/templates/Mautic/0/rancher-compose.yml b/templates/Mautic/0/rancher-compose.yml new file mode 100644 index 0000000..89fa3b2 --- /dev/null +++ b/templates/Mautic/0/rancher-compose.yml @@ -0,0 +1,49 @@ +version: '2' +catalog: + name: Mautic + version: 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. + default: "subdomain.domain.tld" + required: true + type: string + + - variable: "DB_ROOT_PASS" + label: "Database Root Password" + description: | + A secure password to be used by the "root" database user. + # default: + required: true + type: password + + - variable: "DB_USER_PASS" + label: "Database User Password" + description: | + A secure password to be used by the "mautic_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/Mautic" + required: true + type: string \ No newline at end of file diff --git a/templates/Mautic/catalogIcon-nextcloud.svg b/templates/Mautic/catalogIcon-nextcloud.svg new file mode 100644 index 0000000..01cf5e8 --- /dev/null +++ b/templates/Mautic/catalogIcon-nextcloud.svg @@ -0,0 +1 @@ +catalogIcon-nextcloudW \ No newline at end of file diff --git a/templates/Mautic/config.yml b/templates/Mautic/config.yml new file mode 100644 index 0000000..0437694 --- /dev/null +++ b/templates/Mautic/config.yml @@ -0,0 +1,8 @@ +name: Nextcloud +description: | + Nextcloud is a suite of client-server software for creating and using file hosting services. +version: latest +# category: +maintainer: WilliamMiceli +# license: +# projectURL: \ No newline at end of file From b5e504284f619b8c91f4a43faf76d2e4e1b9cf71 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Wed, 14 Aug 2019 20:53:44 -0400 Subject: [PATCH 34/40] Fixed copied files from other template --- templates/Mautic/0/README.md | 31 +--------------------- templates/Mautic/catalogIcon-nextcloud.svg | 1 - templates/Mautic/config.yml | 4 +-- 3 files changed, 3 insertions(+), 33 deletions(-) delete mode 100644 templates/Mautic/catalogIcon-nextcloud.svg diff --git a/templates/Mautic/0/README.md b/templates/Mautic/0/README.md index 1114dd5..e2552bb 100644 --- a/templates/Mautic/0/README.md +++ b/templates/Mautic/0/README.md @@ -1,30 +1 @@ -# Nextcloud - -Nextcloud offers industry-leading on-premises file sync and online collaboration technology. Our expertise is in combining the convenience and ease of use of consumer-grade solutions like Dropbox and Google Drive with the security, privacy and control business needs. - -Our self-hosted solutions ensure you know where data is, who has access, and that even meta-data does not leak. - -## Pre-Requisites - -* Traefik deployed - -## Useful Tools - -* [Official Security Check](https://scan.nextcloud.com/) - -## Easy Redis Setup - -Copy the "redis.config.php" file into your Configuration directory. -You may need to restart your stack for it to pick up. -You can monitor if it is working by opening a shell terminal on your Redis container and using `redis-cli MONITOR` - -## To-Do's - -* Explain how to manually setup Redis -* Fix Cron container, does not yet properly execute yet -* Better setup trusted_proxies - * [Documentation Reference](https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/reverse_proxy_configuration.html?highlight=reverse%20proxy) -* Create my own Nextcloud image and make the following changes: - * Add the Redis config - * Add the reverse proxy config - * Have the entrypoint automatically run the "php occ db:add-missing-indices" \ No newline at end of file +# Mautic \ No newline at end of file diff --git a/templates/Mautic/catalogIcon-nextcloud.svg b/templates/Mautic/catalogIcon-nextcloud.svg deleted file mode 100644 index 01cf5e8..0000000 --- a/templates/Mautic/catalogIcon-nextcloud.svg +++ /dev/null @@ -1 +0,0 @@ -catalogIcon-nextcloudW \ No newline at end of file diff --git a/templates/Mautic/config.yml b/templates/Mautic/config.yml index 0437694..e7ba8bc 100644 --- a/templates/Mautic/config.yml +++ b/templates/Mautic/config.yml @@ -1,6 +1,6 @@ -name: Nextcloud +name: Mautic description: | - Nextcloud is a suite of client-server software for creating and using file hosting services. + Status: Experimental version: latest # category: maintainer: WilliamMiceli From 17882dd5bf76eeb03ec2da59efe91611158e0254 Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Sun, 18 Aug 2019 18:49:34 -0400 Subject: [PATCH 35/40] Testing with updated official docs --- templates/GitLab-Runner/0/docker-compose.yml | 31 ++++++++++++++++---- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index 3b30f61..e25367c 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -10,15 +10,19 @@ services: CI_SERVER_URL: http://gitlab/ # Runner URL REGISTRATION_TOKEN: ${GITLAB_TOKEN} # Runner's registration token RUNNER_EXECUTOR: docker # Select executor, eg. shell, docker, etc. + {{- if .Values.GITLAB_RUNNER_DESCRIPTION}} RUNNER_NAME: ${GITLAB_RUNNER_DESCRIPTION} # Runner name + {{- end}} + {{- if .Values.GITLAB_TAGS}} RUNNER_TAG_LIST: ${GITLAB_TAGS} # Tag list + {{- end}} REGISTER_LOCKED: false # Lock Runner for current project DOCKER_IMAGE: docker:latest # Docker image to be used DOCKER_PRIVILEGED: true # Give extended privileges to container DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} # Add a custom host-to-IP mapping - DOCKER_HOST: tcp://localhost:2375 # Docker daemon address - DOCKER_TLS_CERTDIR: "/certs" # Testing - DOCKER_VOLUMES: "/certs/client" # Testing + DOCKER_HOST: tcp://docker:2375/ # Docker daemon address + DOCKER_TLS_CERTDIR: "/certs" # TLS Enabled + DOCKER_VOLUMES: "/certs/client" # TLS Enabled external_links: {{- if .Values.GITLAB_LINK}} - ${GITLAB_LINK}:gitlab @@ -31,13 +35,29 @@ services: {{- end}} traefik.enable: false 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 - GitLab-Runner:/etc/gitlab-runner gitlab-runner: image: gitlab/gitlab-runner:alpine # Alpine Linux image is designed to use only Docker as the method of spawning runners command: - run + environment: # Options can be found by running "gitlab-runner register". More info found at https://docs.gitlab.com/runner/configuration/advanced-configuration.html + REGISTER_NON_INTERACTIVE: true # Run registration unattended + CI_SERVER_URL: http://gitlab/ # Runner URL + REGISTRATION_TOKEN: ${GITLAB_TOKEN} # Runner's registration token + RUNNER_EXECUTOR: docker # Select executor, eg. shell, docker, etc. + {{- if .Values.GITLAB_RUNNER_DESCRIPTION}} + RUNNER_NAME: ${GITLAB_RUNNER_DESCRIPTION} # Runner name + {{- end}} + {{- if .Values.GITLAB_TAGS}} + RUNNER_TAG_LIST: ${GITLAB_TAGS} # Tag list + {{- end}} + REGISTER_LOCKED: false # Lock Runner for current project + DOCKER_IMAGE: docker:latest # Docker image to be used + DOCKER_PRIVILEGED: true # Give extended privileges to container + DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} # Add a custom host-to-IP mapping + DOCKER_HOST: tcp://docker:2375/ # Docker daemon address + DOCKER_TLS_CERTDIR: "/certs" # TLS Enabled + DOCKER_VOLUMES: "/certs/client" # TLS Enabled {{- if .Values.GITLAB_LINK}} external_links: - ${GITLAB_LINK}:gitlab @@ -54,6 +74,7 @@ services: 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 + - /var/run/docker.sock:/var/run/docker.sock - GitLab-Runner:/etc/gitlab-runner volumes: From 8910cf1af6ce301117ff75ae3c5a42a74b68eebf Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Sun, 18 Aug 2019 19:09:06 -0400 Subject: [PATCH 36/40] Testing without use of DinD --- templates/GitLab-Runner/0/docker-compose.yml | 44 ++++++++------------ 1 file changed, 18 insertions(+), 26 deletions(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index e25367c..ebfe4f7 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -6,23 +6,19 @@ services: command: - register environment: # Options can be found by running "gitlab-runner register". More info found at https://docs.gitlab.com/runner/configuration/advanced-configuration.html - REGISTER_NON_INTERACTIVE: true # Run registration unattended - CI_SERVER_URL: http://gitlab/ # Runner URL - REGISTRATION_TOKEN: ${GITLAB_TOKEN} # Runner's registration token - RUNNER_EXECUTOR: docker # Select executor, eg. shell, docker, etc. + REGISTER_NON_INTERACTIVE: true # Run registration unattended + CI_SERVER_URL: http://gitlab/ # Runner URL + REGISTRATION_TOKEN: ${GITLAB_TOKEN} # Runner's registration token + RUNNER_EXECUTOR: docker # Select executor, eg. shell, docker, etc. {{- if .Values.GITLAB_RUNNER_DESCRIPTION}} - RUNNER_NAME: ${GITLAB_RUNNER_DESCRIPTION} # Runner name + RUNNER_NAME: ${GITLAB_RUNNER_DESCRIPTION} # Runner name {{- end}} {{- if .Values.GITLAB_TAGS}} - RUNNER_TAG_LIST: ${GITLAB_TAGS} # Tag list + RUNNER_TAG_LIST: ${GITLAB_TAGS} # Tag list {{- end}} - REGISTER_LOCKED: false # Lock Runner for current project - DOCKER_IMAGE: docker:latest # Docker image to be used - DOCKER_PRIVILEGED: true # Give extended privileges to container - DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} # Add a custom host-to-IP mapping - DOCKER_HOST: tcp://docker:2375/ # Docker daemon address - DOCKER_TLS_CERTDIR: "/certs" # TLS Enabled - DOCKER_VOLUMES: "/certs/client" # TLS Enabled + REGISTER_LOCKED: false # Lock Runner for current project + DOCKER_IMAGE: docker:latest # Docker image to be used + DOCKER_VOLUMES: "/var/run/docker.sock:/var/run/docker.sock" # TLS Enabled external_links: {{- if .Values.GITLAB_LINK}} - ${GITLAB_LINK}:gitlab @@ -41,23 +37,19 @@ services: command: - run environment: # Options can be found by running "gitlab-runner register". More info found at https://docs.gitlab.com/runner/configuration/advanced-configuration.html - REGISTER_NON_INTERACTIVE: true # Run registration unattended - CI_SERVER_URL: http://gitlab/ # Runner URL - REGISTRATION_TOKEN: ${GITLAB_TOKEN} # Runner's registration token - RUNNER_EXECUTOR: docker # Select executor, eg. shell, docker, etc. + REGISTER_NON_INTERACTIVE: true # Run registration unattended + CI_SERVER_URL: http://gitlab/ # Runner URL + REGISTRATION_TOKEN: ${GITLAB_TOKEN} # Runner's registration token + RUNNER_EXECUTOR: docker # Select executor, eg. shell, docker, etc. {{- if .Values.GITLAB_RUNNER_DESCRIPTION}} - RUNNER_NAME: ${GITLAB_RUNNER_DESCRIPTION} # Runner name + RUNNER_NAME: ${GITLAB_RUNNER_DESCRIPTION} # Runner name {{- end}} {{- if .Values.GITLAB_TAGS}} - RUNNER_TAG_LIST: ${GITLAB_TAGS} # Tag list + RUNNER_TAG_LIST: ${GITLAB_TAGS} # Tag list {{- end}} - REGISTER_LOCKED: false # Lock Runner for current project - DOCKER_IMAGE: docker:latest # Docker image to be used - DOCKER_PRIVILEGED: true # Give extended privileges to container - DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} # Add a custom host-to-IP mapping - DOCKER_HOST: tcp://docker:2375/ # Docker daemon address - DOCKER_TLS_CERTDIR: "/certs" # TLS Enabled - DOCKER_VOLUMES: "/certs/client" # TLS Enabled + REGISTER_LOCKED: false # Lock Runner for current project + DOCKER_IMAGE: docker:latest # Docker image to be used + DOCKER_VOLUMES: "/var/run/docker.sock:/var/run/docker.sock" # TLS Enabled {{- if .Values.GITLAB_LINK}} external_links: - ${GITLAB_LINK}:gitlab From f313dea7bca626d1629dc917c512caf8b44b886d Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Sun, 18 Aug 2019 19:10:39 -0400 Subject: [PATCH 37/40] Fixed comment --- templates/GitLab-Runner/0/docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index ebfe4f7..8f9b432 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -18,7 +18,7 @@ services: {{- end}} REGISTER_LOCKED: false # Lock Runner for current project DOCKER_IMAGE: docker:latest # Docker image to be used - DOCKER_VOLUMES: "/var/run/docker.sock:/var/run/docker.sock" # TLS Enabled + DOCKER_VOLUMES: "/var/run/docker.sock:/var/run/docker.sock" # Docker Socket binding external_links: {{- if .Values.GITLAB_LINK}} - ${GITLAB_LINK}:gitlab @@ -49,7 +49,7 @@ services: {{- end}} REGISTER_LOCKED: false # Lock Runner for current project DOCKER_IMAGE: docker:latest # Docker image to be used - DOCKER_VOLUMES: "/var/run/docker.sock:/var/run/docker.sock" # TLS Enabled + DOCKER_VOLUMES: "/var/run/docker.sock:/var/run/docker.sock" # Docker Socket binding {{- if .Values.GITLAB_LINK}} external_links: - ${GITLAB_LINK}:gitlab From 96922fe86df5eb4ef818783ee0554d43d9ec1072 Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Sun, 18 Aug 2019 19:16:36 -0400 Subject: [PATCH 38/40] Added DOCKER_EXTRA_HOSTS back, as it's still needed --- templates/GitLab-Runner/0/docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index 8f9b432..b55aa5c 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -18,6 +18,7 @@ services: {{- end}} REGISTER_LOCKED: false # Lock Runner for current project DOCKER_IMAGE: docker:latest # Docker image to be used + DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} # Add local alias for GitLab instance within Rancher network DOCKER_VOLUMES: "/var/run/docker.sock:/var/run/docker.sock" # Docker Socket binding external_links: {{- if .Values.GITLAB_LINK}} @@ -49,6 +50,7 @@ services: {{- end}} REGISTER_LOCKED: false # Lock Runner for current project DOCKER_IMAGE: docker:latest # Docker image to be used + DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} # Add local alias for GitLab instance within Rancher network DOCKER_VOLUMES: "/var/run/docker.sock:/var/run/docker.sock" # Docker Socket binding {{- if .Values.GITLAB_LINK}} external_links: From d5039d06eb1f3bdedf5b7ba924e6d7770be32de3 Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Tue, 20 Aug 2019 11:05:27 -0400 Subject: [PATCH 39/40] Changed to development version --- templates/Grav/0/docker-compose.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/Grav/0/docker-compose.yml b/templates/Grav/0/docker-compose.yml index 98b8351..21e5340 100644 --- a/templates/Grav/0/docker-compose.yml +++ b/templates/Grav/0/docker-compose.yml @@ -2,7 +2,7 @@ version: '2' services: grav: - image: williammiceli/grav:latest-git + image: williammiceli/grav:dev-1.6.14-git dns: # Using Cloudflare DNS - 1.1.1.1 - 1.0.0.1 @@ -19,6 +19,7 @@ services: traefik.frontend.headers.forceSTSHeader: true traefik.frontend.headers.referrerPolicy: no-referrer # Security enhancement (Prevents leaking of referer information) traefik.frontend.headers.SSLRedirect: true + traefik.frontend.headers.STSIncludeSubdomains: true traefik.frontend.headers.STSPreload: true traefik.frontend.headers.STSSeconds: 15552000 traefik.frontend.passHostHeader: true From 4b4f56752e1fae24338fcdb63e42145f44ea92c7 Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Tue, 20 Aug 2019 12:31:46 -0400 Subject: [PATCH 40/40] Corrected comments --- templates/Traefik/0/docker-compose.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/Traefik/0/docker-compose.yml b/templates/Traefik/0/docker-compose.yml index fc9da25..aabe8c4 100644 --- a/templates/Traefik/0/docker-compose.yml +++ b/templates/Traefik/0/docker-compose.yml @@ -3,10 +3,10 @@ version: '2' services: traefik: image: traefik:latest - command: --api # Using Rancher API - dns: - - 1.1.1.1 # Cloudflare Public DNS 1 - - 1.0.0.1 # Cloudflare Public DNS 2 + command: --api # Use Web Dashboard + dns: # Using Cloudflare DNS + - 1.1.1.1 + - 1.0.0.1 - 2606:4700:4700::1111 - 2606:4700:4700::1001 labels: @@ -17,7 +17,7 @@ services: io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} {{- end}} ports: - - "${DASHBOARD_PORT}:8080" + - "${DASHBOARD_PORT}:8080" # Traefik Dashboard - "80:80" # HTTP - "443:443" # HTTPS restart: always