-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
37 lines (36 loc) · 972 Bytes
/
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
version: '3.8'
services:
keepalived-anchor:
image: rjchicago/keepalived-anchor:${VERSION:-latest}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- KEEPALIVED_IMAGE=rjchicago/keepalived-float:${VERSION:-latest}
- KEEPALIVED_INTERFACE=bond0
- KEEPALIVED_VIRTUAL_IPS
- DOCKER_NODE_HOSTNAME={{.Node.Hostname}}
deploy:
mode: global
placement:
constraints:
- node.role == manager
keepalived-buoy:
image: rjchicago/keepalived-buoy:${VERSION:-latest}
ports:
- target: 3000
published: 8082
protocol: tcp
mode: host
environment:
DOCKER_NODE_HOSTNAME: "{{.Node.Hostname}}"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 5s
timeout: 2s
retries: 3
start_period: 5s
deploy:
mode: global
placement:
constraints:
- node.role == manager