From c68e8219c83666dac455ad1de437480949432233 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Wed, 16 Jan 2019 19:33:50 -0500 Subject: [PATCH] Testing using external links to other services --- templates/PHPMyAdmin/0/docker-compose.yml | 12 ++--- templates/PHPMyAdmin/0/rancher-compose.yml | 52 ++++++++++++++++++---- 2 files changed, 50 insertions(+), 14 deletions(-) diff --git a/templates/PHPMyAdmin/0/docker-compose.yml b/templates/PHPMyAdmin/0/docker-compose.yml index dd66cb8..e4bfef5 100644 --- a/templates/PHPMyAdmin/0/docker-compose.yml +++ b/templates/PHPMyAdmin/0/docker-compose.yml @@ -8,12 +8,17 @@ services: - 1.0.0.1 environment: PMA_ARBITRARY: 1 # Allows the user to specify any arbitrary server using address/hostname and port + {{- if .Values.SERVICE_LINK_1}} + external_links: + - ${SERVICE_LINK_1}{{- if .Values.SERVICE_LINK_1_ALIAS}}:${SERVICE_LINK_1_ALIAS}{{- end}} + - ${SERVICE_LINK_2}{{- if .Values.SERVICE_LINK_2_ALIAS}}:${SERVICE_LINK_2_ALIAS}{{- end}} + - ${SERVICE_LINK_3}{{- if .Values.SERVICE_LINK_3_ALIAS}}:${SERVICE_LINK_3_ALIAS}{{- end}} + {{- end}} labels: io.rancher.container.pull_image: always {{- if .Values.HOST_LABEL}} io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} {{- end}} - {{- if .Values.TRAEFIK_HOST}} traefik.enable: true ### Start Web Segment traefik.web.frontend.entryPoints: http,https @@ -26,9 +31,4 @@ services: traefik.web.frontend.rule: Host:${TRAEFIK_HOST} traefik.web.port: "80" ### End Web Segment - {{- else}} - traefik.enable: false - {{- end}} - ports: - - "${WEB_PORT}:80" restart: on-failure \ No newline at end of file diff --git a/templates/PHPMyAdmin/0/rancher-compose.yml b/templates/PHPMyAdmin/0/rancher-compose.yml index 47a8778..0091e7e 100644 --- a/templates/PHPMyAdmin/0/rancher-compose.yml +++ b/templates/PHPMyAdmin/0/rancher-compose.yml @@ -21,15 +21,51 @@ catalog: 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 + required: true type: string - - variable: "WEB_PORT" - label: "Local Web Port" + - variable: "SERVICE_LINK_1" + label: "Service 1" description: | - The port to locally access the web interface on. - default: "10700" - required: true - type: string \ No newline at end of file + (Optional) Create a link to another service + required: false + type: service + + - variable: "SERVICE_LINK_1_ALIAS" + label: "Service 1 Alias" + description: | + (Optional) Create an alias for the service + # default: + required: false + type: service + + - variable: "SERVICE_LINK_2" + label: "Service 2" + description: | + (Optional) Create a link to another service + required: false + type: service + + - variable: "SERVICE_LINK_2_ALIAS" + label: "Service 2 Alias" + description: | + (Optional) Create an alias for the service + # default: + required: false + type: service + + - variable: "SERVICE_LINK_3" + label: "Service 3" + description: | + (Optional) Create a link to another service + required: false + type: service + + - variable: "SERVICE_LINK_3_ALIAS" + label: "Service 3 Alias" + description: | + (Optional) Create an alias for the service + # default: + required: false + type: service \ No newline at end of file