From bdae7005ab04b99c5cd342236015d644b3208976 Mon Sep 17 00:00:00 2001 From: WilliamMiceli <9000802+WilliamMiceli@users.noreply.github.com> Date: Fri, 28 Sep 2018 14:31:44 -0400 Subject: [PATCH] Added Redis container possibility --- templates/Nextcloud/0/docker-compose.yml | 17 +++++++++++++++++ templates/Nextcloud/0/rancher-compose.yml | 8 ++++++++ 2 files changed, 25 insertions(+) diff --git a/templates/Nextcloud/0/docker-compose.yml b/templates/Nextcloud/0/docker-compose.yml index c03fc48..ebe9742 100644 --- a/templates/Nextcloud/0/docker-compose.yml +++ b/templates/Nextcloud/0/docker-compose.yml @@ -34,6 +34,9 @@ services: {{- end}} links: - mysql + {{- if eq .Values.REDIS "true"}} + - redis + {{- end}} networks: - public-proxy ports: @@ -60,6 +63,20 @@ services: restart: on-failure volumes: - /RancherCattleData/${DATA_DIR}/Database:/var/lib/mysql + {{- if eq .Values.REDIS "true"}} + redis: + image: redis:latest + dns: + - 1.1.1.1 + - 1.0.0.1 + labels: + {{- if .Values.HOST_LABEL}} + io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} + {{- end}} + restart: on-failure + volumes: + - /RancherCattleData/${DATA_DIR}/Redis:/data + {{- end}} networks: public-proxy: diff --git a/templates/Nextcloud/0/rancher-compose.yml b/templates/Nextcloud/0/rancher-compose.yml index 7c7e01e..961f426 100644 --- a/templates/Nextcloud/0/rancher-compose.yml +++ b/templates/Nextcloud/0/rancher-compose.yml @@ -65,6 +65,14 @@ catalog: required: true type: password + - variable: "REDIS" + label: "Enable Redis container" + description: | + Add a Redis container for memory caching. Must be setup manually. + default: true + required: true + type: boolean + - variable: "DATA_DIR" label: "Data Directory" description: |