-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-stack.yml
executable file
·71 lines (64 loc) · 1.29 KB
/
docker-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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
version: '3.5'
services:
drone-server:
image: "${DRONE_SERVER_IMAGE:-drone/drone:0.8}"
ports:
- 8000:8000
networks:
- drone
configs:
- source: server-env
target: /.env
volumes:
- drone-server-data:/var/lib/drone/
deploy:
placement:
constraints:
- node.role==worker
replicas: 1
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
drone-agent:
image: "${DRONE_AGENT_IMAGE:-drone/agent:0.8}"
command: agent
networks:
- drone
# depends_on:
# - drone-server
configs:
- source: agent-env
target: /.env
volumes:
- /var/run/docker.sock:/var/run/docker.sock
deploy:
placement:
constraints:
- node.role==worker
replicas: 3
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
update_config:
parallelism: 1
delay: 20s
networks:
drone:
driver: overlay
configs:
server-env:
file: ./.server-env
agent-env:
file: ./.agent-env
# see https://github.com/drone/drone/issues/2223
#secrets:
# drone-secret:
# file: ./awesome-secret
volumes:
drone-server-data:
external: true