Created
March 24, 2017 09:59
-
-
Save christopherobin/9ae38a536bdf62e8f0c8076a93a3e360 to your computer and use it in GitHub Desktop.
Gitlab CI compose-file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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