From 8523f16cef6fa1b0b7b15101fe61f8e2381766ec Mon Sep 17 00:00:00 2001 From: WilliamMiceli <9000802+WilliamMiceli@users.noreply.github.com> Date: Mon, 27 Aug 2018 18:23:44 -0400 Subject: [PATCH] Added Traefik host option --- templates/Ghost/0/docker-compose.yml | 8 ++++++-- templates/Ghost/0/rancher-compose.yml | 9 +++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/templates/Ghost/0/docker-compose.yml b/templates/Ghost/0/docker-compose.yml index 86819bd..4cee06a 100644 --- a/templates/Ghost/0/docker-compose.yml +++ b/templates/Ghost/0/docker-compose.yml @@ -8,13 +8,17 @@ services: - 1.0.0.1 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.frontend.rule: Host:blog.williammiceli.me + traefik.frontend.rule: Host:${TRAEFIK_HOST} traefik.port: "2368" traefik.frontend.entryPoints: https + {{- else}} + traefik.enable: false + {{- end}} networks: - public-proxy ports: diff --git a/templates/Ghost/0/rancher-compose.yml b/templates/Ghost/0/rancher-compose.yml index 7f2e64e..739ba49 100644 --- a/templates/Ghost/0/rancher-compose.yml +++ b/templates/Ghost/0/rancher-compose.yml @@ -17,6 +17,15 @@ catalog: required: false type: string + - variable: TRAEFIK_HOST + label: "Public Host Domain" + description: | + The host that Traefik will use to provide public access. + Leaving this empty will disable Traefik on this stack. + default: "subdomain.domain.tld" + required: false + type: string + - variable: WEB_PORT label: "Web Port" description: |