From 1cd8701009876eda65c33559415530b1aa74d731 Mon Sep 17 00:00:00 2001 From: WilliamMiceli <9000802+WilliamMiceli@users.noreply.github.com> Date: Fri, 28 Sep 2018 15:27:16 -0400 Subject: [PATCH] First actual modifications from example --- templates/gitlab-ce/0/docker-compose.yml | 34 +++++++++++++++++----- templates/gitlab-ce/0/rancher-compose.yml | 35 ++++++++++++++++++++++- 2 files changed, 61 insertions(+), 8 deletions(-) diff --git a/templates/gitlab-ce/0/docker-compose.yml b/templates/gitlab-ce/0/docker-compose.yml index c7d42e1..d4ef9f5 100644 --- a/templates/gitlab-ce/0/docker-compose.yml +++ b/templates/gitlab-ce/0/docker-compose.yml @@ -2,15 +2,35 @@ version: '2' services: gitlab-ce: image: gitlab/gitlab-ce:latest + dns: + - 1.1.1.1 + - 1.0.0.1 environment: GITLAB_OMNIBUS_CONFIG: | - external_url ${EXTERNAL_URL} - hostname: ${HOSTNAME} + external_url 'https://${TRAEFIK_HOST}' +# hostname: ${TRAEFIK_HOST} labels: io.rancher.container.pull_image: always - io.rancher.scheduler.affinity:host_label: ${HOST_LABEL_KEY}=${HOST_LABEL_VALUE} - restart: always + {{- if .Values.HOST_LABEL}} + io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} + {{- end}} + {{- if .Values.TRAEFIK_HOST}} + traefik.enable: true + traefik.frontend.rule: Host:${TRAEFIK_HOST} + traefik.port: "80" + traefik.frontend.entryPoints: http,https + traefik.frontend.headers.forceSTSHeader: true + traefik.frontend.headers.SSLRedirect: true + traefik.frontend.headers.STSPreload: true + traefik.frontend.headers.STSSeconds: 15552000 + {{- else}} + traefik.enable: false + {{- end}} + ports: + - "${WEB_PORT}:80" +# - "${SSH_PORT}:22" + restart: volumes: - - ${CONFIG_DIR}:/etc/gitlab - - ${LOG_DIR}:/var/log/gitlab - - ${DATA_DIR}:/var/opt/gitlab \ No newline at end of file + - /RancherCattleConfig/${DATA_DIR}/Config:/etc/gitlab + - /RancherCattleConfig/${DATA_DIR}/Logs:/var/log/gitlab + - /RancherCattleData/${DATA_DIR}/Data:/var/opt/gitlab \ No newline at end of file diff --git a/templates/gitlab-ce/0/rancher-compose.yml b/templates/gitlab-ce/0/rancher-compose.yml index ef852fe..ec18038 100644 --- a/templates/gitlab-ce/0/rancher-compose.yml +++ b/templates/gitlab-ce/0/rancher-compose.yml @@ -6,4 +6,37 @@ catalog: # minimum_rancher_version: # maximum_rancher_version: # upgrade_from: - # questions: \ No newline at end of file + questions: + + - variable: "HOST_LABEL" + label: "Host Label Key/Value Pair" + description: | + The Label Key/Value pair on the host which containers should be deployed + default: "host.id=Host2" + 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: | + The port to access the web interface on. + default: "20300" + required: true + type: string + + - variable: "DATA_DIR" + label: "Data Directory" + description: | + The directory to store persistent data for the stack. + default: "Personal/Gitlab-CE" + required: true + type: string \ No newline at end of file