-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (38 loc) · 1.03 KB
/
docker-compose.yml
File metadata and controls
43 lines (38 loc) · 1.03 KB
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
version: '3.8'
# Docker-Compose 单容器使用参考 YAML 配置文件
# 更多配置参数请参考镜像 README.md 文档中说明
services:
keepalived:
image: 'registry.cn-shenzhen.aliyuncs.com/colovu/keepalived:2.1'
privileged: true
networks:
- back-tier
environment:
- KEEPALIVED_STATE=MASTER
- KEEPALIVED_PRIORITY=100
- KEEPALIVED_VIPS=172.50.0.100,172.50.0.102
keepalived1:
image: 'registry.cn-shenzhen.aliyuncs.com/colovu/keepalived:2.1'
privileged: true
networks:
- back-tier
environment:
- KEEPALIVED_STATE=MASTER
- KEEPALIVED_PRIORITY=90
- KEEPALIVED_VIPS=172.50.0.100,172.50.0.102
keepalived2:
image: 'registry.cn-shenzhen.aliyuncs.com/colovu/keepalived:2.1'
cap_add:
- NET_ADMIN
- NET_RAW
networks:
- back-tier
environment:
- KEEPALIVED_STATE=BACKUP
- KEEPALIVED_PRIORITY=80
- KEEPALIVED_VIPS=172.50.0.100,172.50.0.102
networks:
back-tier:
ipam:
config:
- subnet: 172.50.0.0/16