From 9682aa79c51e8cabddd1aeb0dbcd103cefe22d3c Mon Sep 17 00:00:00 2001 From: sido Date: Fri, 9 Mar 2018 10:46:39 +0100 Subject: [PATCH] fix(traefik environment): added labels for traefik --- templates/molgenis/0/docker-compose.yml | 13 ++++++------- templates/molgenis/0/rancher-compose.yml | 6 ++++++ templates/molgenis/1/docker-compose.yml | 4 ++++ templates/molgenis/1/rancher-compose.yml | 6 ++++++ templates/molgenis/2/docker-compose.yml | 1 + templates/molgenis/2/rancher-compose.yml | 6 ++++++ templates/molgenis/3/docker-compose.yml | 1 + templates/molgenis/3/rancher-compose.yml | 6 ++++++ 8 files changed, 36 insertions(+), 7 deletions(-) diff --git a/templates/molgenis/0/docker-compose.yml b/templates/molgenis/0/docker-compose.yml index 891cb5e..f27d861 100644 --- a/templates/molgenis/0/docker-compose.yml +++ b/templates/molgenis/0/docker-compose.yml @@ -7,16 +7,15 @@ app: volumes: - app-data:/opt/molgenis labels: - io.rancher.container.create_agent: 'true' - io.rancher.scheduler.global: 'true' + io.rancher.container.create_agent: true + io.rancher.scheduler.global: true + traefik.frontend.rule: Host:${DOMAINS} + traefik.backend: ${TRAEFIK_BACKEND} + traefik.enable: true + traefik.port: 8080 db: build: ./db expose: - 5432 volumes: - db-data:/var/lib/postgresql/data - labels: - io.rancher.container.create_agent: 'true' -volumes: - db-data: - app-data: diff --git a/templates/molgenis/0/rancher-compose.yml b/templates/molgenis/0/rancher-compose.yml index 8d89458..99aa579 100644 --- a/templates/molgenis/0/rancher-compose.yml +++ b/templates/molgenis/0/rancher-compose.yml @@ -10,6 +10,12 @@ required: true default: "test.molgenis.org,test.dcktest.gcc.rug.nl" type: "string" + - variable: "TRAEFIK_BACKEND" + description: "Name of the server when added to loadbalancer" + label: "Backend:" + required: true + default: "test.molgenis.org" + type: "string" start_on_create: true scale: 1 diff --git a/templates/molgenis/1/docker-compose.yml b/templates/molgenis/1/docker-compose.yml index 6bec5de..63a7310 100644 --- a/templates/molgenis/1/docker-compose.yml +++ b/templates/molgenis/1/docker-compose.yml @@ -9,6 +9,10 @@ app: labels: io.rancher.sidekicks: molgenis-data io.rancher.scheduler.global: true + traefik.frontend.rule: Host:${DOMAINS} + traefik.backend: ${TRAEFIK_BACKEND} + traefik.enable: true + traefik.port: 8080 db: image: postgres:9.6-alpine diff --git a/templates/molgenis/1/rancher-compose.yml b/templates/molgenis/1/rancher-compose.yml index 25911b7..101efaf 100644 --- a/templates/molgenis/1/rancher-compose.yml +++ b/templates/molgenis/1/rancher-compose.yml @@ -10,6 +10,12 @@ required: true default: "test.molgenis.org,test.dcktest.gcc.rug.nl" type: "string" + - variable: "TRAEFIK_BACKEND" + description: "Name of the server when added to loadbalancer" + label: "Backend:" + required: true + default: "test.molgenis.org" + type: "string" start_on_create: true scale: 1 diff --git a/templates/molgenis/2/docker-compose.yml b/templates/molgenis/2/docker-compose.yml index 7fbd9d3..6def96a 100644 --- a/templates/molgenis/2/docker-compose.yml +++ b/templates/molgenis/2/docker-compose.yml @@ -12,6 +12,7 @@ io.rancher.container.pull_image: always io.rancher.scheduler.global: true traefik.frontend.rule: Host:${DOMAINS} + traefik.backend: ${TRAEFIK_BACKEND} traefik.enable: true traefik.port: 8080 diff --git a/templates/molgenis/2/rancher-compose.yml b/templates/molgenis/2/rancher-compose.yml index 14b43e4..a42daa3 100644 --- a/templates/molgenis/2/rancher-compose.yml +++ b/templates/molgenis/2/rancher-compose.yml @@ -10,6 +10,12 @@ required: true default: "test.molgenis.org,test.dcktest.gcc.rug.nl" type: "string" + - variable: "TRAEFIK_BACKEND" + description: "Name of the server when added to loadbalancer" + label: "Backend:" + required: true + default: "test.molgenis.org" + type: "string" start_on_create: true scale: 1 diff --git a/templates/molgenis/3/docker-compose.yml b/templates/molgenis/3/docker-compose.yml index 37f670e..2bf5bf1 100644 --- a/templates/molgenis/3/docker-compose.yml +++ b/templates/molgenis/3/docker-compose.yml @@ -12,6 +12,7 @@ io.rancher.container.pull_image: always io.rancher.scheduler.global: true traefik.frontend.rule: Host:${DOMAINS} + traefik.backend: ${TRAEFIK_BACKEND} traefik.enable: true traefik.port: 8080 diff --git a/templates/molgenis/3/rancher-compose.yml b/templates/molgenis/3/rancher-compose.yml index 00d9b24..373afc2 100644 --- a/templates/molgenis/3/rancher-compose.yml +++ b/templates/molgenis/3/rancher-compose.yml @@ -10,6 +10,12 @@ required: true default: "test.molgenis.org,test.dcktest.gcc.rug.nl" type: "string" + - variable: "TRAEFIK_BACKEND" + description: "Name of the server when added to loadbalancer" + label: "Backend:" + required: true + default: "test.molgenis.org" + type: "string" start_on_create: true scale: 1