Files
Personal-Rancher-Catalog/templates/GitLab-Runner/0/docker-compose.yml
William Miceli a96662613a Fixed minor issue
2019-08-01 14:51:25 -04:00

60 lines
2.0 KiB
YAML

version: '2'
services:
gitlab-runner-config:
image: gitlab/gitlab-runner:alpine # Alpine Linux image is designed to use only Docker as the method of spawning runners
command:
- register
environment:
REGISTER_NON_INTERACTIVE: true
CI_SERVER_URL: http://gitlab/
REGISTRATION_TOKEN: ${GITLAB_TOKEN}
RUNNER_EXECUTOR: docker
RUNNER_NAME: ${GITLAB_RUNNER_DESCRIPTION}
RUNNER_TAG_LIST: ${GITLAB_TAGS}
REGISTER_LOCKED: false
DOCKER_IMAGE: docker:latest
DOCKER_PRIVILEGED: true
DOCKER_EXTRA_HOSTS: gitlab:${GITLAB_IP}
DOCKER_HOST: tcp://docker:2375/
external_links:
{{- if .Values.GITLAB_LINK}}
- ${GITLAB_LINK}:gitlab
{{- end}}
labels:
io.rancher.container.pull_image: always
io.rancher.container.start_once: true
{{- if .Values.HOST_LABEL}}
io.rancher.scheduler.affinity:host_label: ${HOST_LABEL}
{{- 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
{{- if .Values.GITLAB_LINK}}
external_links:
- ${GITLAB_LINK}:gitlab
{{- 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
privileged: true
restart: always
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
volumes:
GitLab-Runner:
driver: local