-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
46 lines (45 loc) · 1023 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
38
39
40
41
42
43
44
45
46
version: "3"
services:
keepalived_master:
build:
context: ./
dockerfile: ./Dockerfile
volumes:
- ./index-master.html:/var/www/html/index.html
- ./keepalived-master.conf:/etc/keepalived/keepalived.conf
ports:
- target: 80
published: 8880
networks:
static-network:
ipv4_address: 172.20.128.2
cap_add:
- NET_ADMIN
keepalived_backup:
build:
context: ./
dockerfile: ./Dockerfile
volumes:
- ./index-backup.html:/var/www/html/index.html
- ./keepalived-backup.conf:/etc/keepalived/keepalived.conf
ports:
- target: 80
published: 8881
networks:
static-network:
ipv4_address: 172.20.128.3
cap_add:
- NET_ADMIN
proxy:
image: haproxy:1.7-alpine
ports:
- 8000:6301
volumes:
- ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
networks:
- static-network
networks:
static-network:
ipam:
config:
- subnet: 172.20.0.0/16