From 17882dd5bf76eeb03ec2da59efe91611158e0254 Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Sun, 18 Aug 2019 18:49:34 -0400 Subject: [PATCH] Testing with updated official docs --- templates/GitLab-Runner/0/docker-compose.yml | 31 ++++++++++++++++---- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/templates/GitLab-Runner/0/docker-compose.yml b/templates/GitLab-Runner/0/docker-compose.yml index 3b30f61..e25367c 100644 --- a/templates/GitLab-Runner/0/docker-compose.yml +++ b/templates/GitLab-Runner/0/docker-compose.yml @@ -10,15 +10,19 @@ services: CI_SERVER_URL: http://gitlab/ # Runner URL REGISTRATION_TOKEN: ${GITLAB_TOKEN} # Runner's registration token RUNNER_EXECUTOR: docker # Select executor, eg. shell, docker, etc. + {{- if .Values.GITLAB_RUNNER_DESCRIPTION}} RUNNER_NAME: ${GITLAB_RUNNER_DESCRIPTION} # Runner name + {{- end}} + {{- if .Values.GITLAB_TAGS}} RUNNER_TAG_LIST: ${GITLAB_TAGS} # Tag list + {{- end}} REGISTER_LOCKED: false # Lock Runner for current project DOCKER_IMAGE: docker:latest # Docker image to be used DOCKER_PRIVILEGED: true # Give extended privileges to container DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} # Add a custom host-to-IP mapping - DOCKER_HOST: tcp://localhost:2375 # Docker daemon address - DOCKER_TLS_CERTDIR: "/certs" # Testing - DOCKER_VOLUMES: "/certs/client" # Testing + DOCKER_HOST: tcp://docker:2375/ # Docker daemon address + DOCKER_TLS_CERTDIR: "/certs" # TLS Enabled + DOCKER_VOLUMES: "/certs/client" # TLS Enabled external_links: {{- if .Values.GITLAB_LINK}} - ${GITLAB_LINK}:gitlab @@ -31,13 +35,29 @@ services: {{- end}} traefik.enable: false volumes: - - /etc/localtime:/etc/localtime:ro # Syncronize time of container with the host system - - /etc/timezone:/etc/timezone:ro # Syncronize timezone of container with the host system - GitLab-Runner:/etc/gitlab-runner gitlab-runner: image: gitlab/gitlab-runner:alpine # Alpine Linux image is designed to use only Docker as the method of spawning runners command: - run + environment: # Options can be found by running "gitlab-runner register". More info found at https://docs.gitlab.com/runner/configuration/advanced-configuration.html + REGISTER_NON_INTERACTIVE: true # Run registration unattended + CI_SERVER_URL: http://gitlab/ # Runner URL + REGISTRATION_TOKEN: ${GITLAB_TOKEN} # Runner's registration token + RUNNER_EXECUTOR: docker # Select executor, eg. shell, docker, etc. + {{- if .Values.GITLAB_RUNNER_DESCRIPTION}} + RUNNER_NAME: ${GITLAB_RUNNER_DESCRIPTION} # Runner name + {{- end}} + {{- if .Values.GITLAB_TAGS}} + RUNNER_TAG_LIST: ${GITLAB_TAGS} # Tag list + {{- end}} + REGISTER_LOCKED: false # Lock Runner for current project + DOCKER_IMAGE: docker:latest # Docker image to be used + DOCKER_PRIVILEGED: true # Give extended privileges to container + DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP} # Add a custom host-to-IP mapping + DOCKER_HOST: tcp://docker:2375/ # Docker daemon address + DOCKER_TLS_CERTDIR: "/certs" # TLS Enabled + DOCKER_VOLUMES: "/certs/client" # TLS Enabled {{- if .Values.GITLAB_LINK}} external_links: - ${GITLAB_LINK}:gitlab @@ -54,6 +74,7 @@ services: volumes: - /etc/localtime:/etc/localtime:ro # Syncronize time of container with the host system - /etc/timezone:/etc/timezone:ro # Syncronize timezone of container with the host system + - /var/run/docker.sock:/var/run/docker.sock - GitLab-Runner:/etc/gitlab-runner volumes: