Added Redis container possibility

This commit is contained in:
WilliamMiceli
2018-09-28 14:31:44 -04:00
parent d335f9fc52
commit bdae7005ab
2 changed files with 25 additions and 0 deletions

View File

@@ -34,6 +34,9 @@ services:
{{- end}} {{- end}}
links: links:
- mysql - mysql
{{- if eq .Values.REDIS "true"}}
- redis
{{- end}}
networks: networks:
- public-proxy - public-proxy
ports: ports:
@@ -60,6 +63,20 @@ services:
restart: on-failure restart: on-failure
volumes: volumes:
- /RancherCattleData/${DATA_DIR}/Database:/var/lib/mysql - /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: networks:
public-proxy: public-proxy:

View File

@@ -65,6 +65,14 @@ catalog:
required: true required: true
type: password 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" - variable: "DATA_DIR"
label: "Data Directory" label: "Data Directory"
description: | description: |