Files
Personal-Rancher-Catalog/templates/Guacamole/0/docker-compose.yml
2019-01-16 18:47:56 -05:00

79 lines
2.7 KiB
YAML

version: '2'
services:
guacamole:
image: guacamole/guacamole:latest
dns:
- 1.1.1.1
- 1.0.0.1
environment:
GUACD_HOSTNAME: guacd
MYSQL_HOSTNAME: mysql
MYSQL_DATABASE: guacamole_db
MYSQL_USER: guacamole_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: true
### Start HTTP Segment
traefik.http.frontend.entryPoints: http
traefik.http.frontend.headers.SSLRedirect: true
traefik.http.frontend.rule: Host:${TRAEFIK_HOSTNAME}
### End HTTP Segment
### Start HTTPS Segment
traefik.https.frontend.entryPoints: https
traefik.https.frontend.headers.forceSTSHeader: true
traefik.https.frontend.headers.referrerPolicy: no-referrer # Security enhancement (Prevents leaking of referer information)
traefik.https.frontend.headers.STSPreload: true
traefik.https.frontend.headers.STSSeconds: 15552000
traefik.https.frontend.rule: "Host:${TRAEFIK_HOSTNAME}; AddPrefix:/guacamole"
traefik.https.port: "8080"
### End HTTPS Segment
links:
- guacd
- 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
- /RancherCattle/${DATA_DIR}/Setup:/setup
guacd:
image: guacamole/guacd:latest
dns:
- 1.1.1.1
- 1.0.0.1
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
mysql:
image: mysql:5
dns:
- 1.1.1.1
- 1.0.0.1
environment:
MYSQL_DATABASE: guacamole_db
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS}
MYSQL_USER: guacamole_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
- /RancherCattle/${DATA_DIR}/Database:/var/lib/mysql
- /RancherCattle/${DATA_DIR}/Setup:/setup