-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
119 lines (113 loc) · 2.57 KB
/
docker-compose.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
version: "3.3"
services:
traefik:
image: traefik:1.7.9
command:
- "--api"
- "--entrypoints=Name:http Address::80"
- "--defaultentrypoints=http"
- "--docker"
- "--docker.swarmMode"
- "--docker.domain=${DOMAIN_NAME}"
- "--docker.watch"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- traefik-net
ports:
- 80:80
deploy:
labels:
traefik.enable: 'true'
traefik.docker.network: traefik-net
traefik.frontend.rule: "Host:traefik.${DOMAIN_NAME}"
traefik.port: 8080
placement:
constraints:
- node.role == manager
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: on-failure
swarmpit:
image: swarmpit/swarmpit:1.7
environment:
- SWARMPIT_DB=http://swarmpit_db:5984
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- net
- traefik-net
deploy:
labels:
traefik.enable: 'true'
traefik.docker.network: traefik-net
traefik.frontend.rule: "Host:swarmpit.${DOMAIN_NAME}"
traefik.port: 8080
resources:
limits:
cpus: '0.50'
memory: 1024M
reservations:
cpus: '0.25'
memory: 512M
placement:
constraints:
- node.role == manager
swarmpit_db:
image: couchdb:2.3.0
volumes:
- db-data:/opt/couchdb/data
networks:
- net
deploy:
resources:
limits:
cpus: '0.30'
memory: 512M
reservations:
cpus: '0.15'
memory: 256M
placement:
constraints:
- node.role == manager
swarmpit_agent:
image: swarmpit/agent:2.1
environment:
- EVENT_ENDPOINT=http://swarmpit:8080/events
- HEALTH_CHECK_ENDPOINT=http://swarmpit:8080/version
- DOCKER_API_VERSION=1.35
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- net
deploy:
mode: global
labels:
swarmpit.agent: 'true'
resources:
limits:
cpus: '0.10'
memory: 64M
reservations:
cpus: '0.05'
memory: 32M
cluster_cleanup:
image: docker
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
command: docker system prune --all --force
deploy:
mode: global
restart_policy:
delay: 24h
networks:
net:
driver: overlay
traefik-net:
driver: overlay
external: true
volumes:
db-data:
driver: local