-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-stack.yml
47 lines (47 loc) · 1.09 KB
/
docker-compose-stack.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
version: "3.8"
services:
gitlab-runner:
image: gitlab/gitlab-runner:alpine
deploy:
mode: replicated
replicas: 3
placement:
max_replicas_per_node: 1
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- gitlab-runner-config:/etc/gitlab-runner gitlab/gitlab-runner register
environment:
- CI_SERVER_URL=https://git.${MASTER_URL}/
- REGISTRATION_TOKEN=${GITLAB_RUNNER_TOKEN}
networks:
- private
logging:
driver: none
agent:
image: portainer/agent
environment:
AGENT_CLUSTER_ADDR: tasks.agent
AGENT_PORT: 2027
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker/volumes:/var/lib/docker/volumes
networks:
- private
deploy:
mode: global
placement:
constraints:
- node.platform.os == linux
restart_policy:
condition: on-failure
delay: 30s
max_attempts: 3
window: 600s
logging:
driver: none
volumes:
gitlab-runner-config:
networks:
private:
driver: overlay
external: true