Added Traefik as public proxy and basic authentication

This commit is contained in:
William Miceli
2018-09-11 10:34:17 -04:00
parent 65378bfd2d
commit 5f4ad6cc82
2 changed files with 40 additions and 8 deletions

View File

@@ -7,14 +7,28 @@ services:
- 1.0.0.1
environment:
CHE_DNS_RESOLVERS: 1.1.1.1,1.0.0.1
CHE_DOCKER_IP_EXTERNAL: ${HOST_IP}
CHE_HOST: ${HOST_IP}
CHE_DOCKER_IP_EXTERNAL: ${TRAEFIK_HOST}
CHE_HOST: ${TRAEFIK_HOST}
CHE_IN_VM: true
labels:
io.rancher.container.pull_image: always
{{- if (.Values.HOST_LABEL)}}
{{- if .Values.HOST_LABEL}}
io.rancher.scheduler.affinity:host_label: ${HOST_LABEL}
{{- end}}
{{- if .Values.TRAEFIK_HOST}}
traefik.enable: true
traefik.port: "80"
{{- if .Values.TRAEFIK_BASIC_AUTH}}
traefik.frontend.auth.basic: ${TRAEFIK_BASIC_AUTH}
{{- end}}
# traefik.frontend.headers.SSLRedirect: true
traefik.frontend.entryPoints: http,https
traefik.frontend.redirect.entryPoint: https
traefik.frontend.redirect.permanent: true
traefik.frontend.rule: Host:${TRAEFIK_HOST}
{{- else}}
traefik.enable: false
{{- end}}
ports:
- "${CHE_PORT}:8080"
restart: on-failure