Skip to content

Instantly share code, notes, and snippets.

@christopherobin
Created March 24, 2017 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christopherobin/9ae38a536bdf62e8f0c8076a93a3e360 to your computer and use it in GitHub Desktop.
Save christopherobin/9ae38a536bdf62e8f0c8076a93a3e360 to your computer and use it in GitHub Desktop.
Gitlab CI compose-file
version: "3.0"
networks:
net:
driver: overlay
traefik:
external:
name: traefik_net
volumes:
runner:
gitlab:
logs:
data:
services:
runner:
image: gitlab/gitlab-runner:latest
networks:
- net
volumes:
- runner:/etc/gitlab-runner
- /var/run/docker.sock:/var/run/docker.sock
deploy:
mode: global
placement:
constraints:
- engine.labels.node.type == worker
restart_policy:
condition: on-failure
gitlab:
image: gitlab/gitlab-ce:latest
networks:
- net
- traefik
volumes:
- gitlab:/etc/gitlab
- logs:/var/log/gitlab
- data:/var/opt/gitlab
deploy:
placement:
constraints:
- engine.labels.node.type == worker
- node.hostname == worker-1
restart_policy:
condition: on-failure
labels:
traefik.port: 80
traefik.frontend.rule: Host:gitlab.domain
traefik.backend.loadbalancer.sticky: "true"
traefik.docker.network: traefik_net
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment