From 2fa4c615f39e18bd4aafad86a76d462d4cc6e6db Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Tue, 12 Mar 2019 13:47:55 -0400 Subject: [PATCH] Now two separate services --- templates/GitLab-Runner/0/docker-compose.yml | 28 ++++++++++++++++--- templates/GitLab-Runner/0/rancher-compose.yml | 8 ++++++ 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index 2e7746e..2a27b03 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -1,7 +1,7 @@ version: '2' services: - gitlab-runner: + gitlab-runner-config: image: gitlab/gitlab-runner:alpine command: - register @@ -24,8 +24,6 @@ services: {{- end}} - --run-untagged - --locked=false - - ; - - run dns: - 1.1.1.1 - 1.0.0.1 @@ -41,4 +39,26 @@ services: traefik.enable: false restart: on-failure volumes: - - /var/run/docker.sock:/var/run/docker.sock \ No newline at end of file + - /var/run/docker.sock:/var/run/docker.sock + - /RancherCattle/${DATA_DIR}:/etc/gitlab-runner + gitlab-runner: + image: gitlab/gitlab-runner:alpine + command: + - run + dns: + - 1.1.1.1 + - 1.0.0.1 + {{- if .Values.GITLAB_LINK}} + external_links: + - ${GITLAB_LINK}{{- if .Values.GITLAB_LINK_ALIAS}}:${GITLAB_LINK_ALIAS}{{- end}} + {{- end}} + labels: + io.rancher.container.pull_image: always + {{- if .Values.HOST_LABEL}} + io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} + {{- end}} + io.rancher.sidekicks: gitlab-runner-config + traefik.enable: false + restart: on-failure + volumes-from: + - gitlab-runner-config \ No newline at end of file diff --git a/templates/GitLab-Runner/0/rancher-compose.yml b/templates/GitLab-Runner/0/rancher-compose.yml index 1de9c9d..be2c9f2 100644 --- a/templates/GitLab-Runner/0/rancher-compose.yml +++ b/templates/GitLab-Runner/0/rancher-compose.yml @@ -64,4 +64,12 @@ catalog: (Optional) Create an alias for the service. default: "gitlab" required: false + type: string + + - variable: "DATA_DIR" + label: "Data Directory" + description: | + The directory to store persistent data for the stack. + default: "Personal/GitLab-Runner" + required: true type: string \ No newline at end of file