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: |