-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
107 lines (100 loc) · 2.15 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
---
version: '3.5'
services:
redis01:
image: redis:cluster
restart: always
container_name: redis01
hostname: redis01
networks:
redis-network:
ipv4_address: 172.23.0.11
volumes:
- ./data/redis01:/var/lib/redis
- ${PWD}/redis01:/etc/redis
redis02:
image: redis:cluster
container_name: redis02
hostname: redis02
networks:
redis-network:
ipv4_address: 172.23.0.12
volumes:
- ./data/redis02:/var/lib/redis
- ${PWD}/redis02:/etc/redis
depends_on:
- redis01
redis03:
image: redis:cluster
container_name: redis03
hostname: redis03
networks:
redis-network:
ipv4_address: 172.23.0.13
volumes:
- ./data/redis03:/var/lib/redis
- ${PWD}/redis03:/etc/redis
depends_on:
- redis02
sentinel01:
image: redis:sentinel
container_name: sentinel01
hostname: sentinel01
networks:
redis-network:
ipv4_address: 172.23.0.14
volumes:
- ./data/redis01:/var/lib/redis
- ${PWD}/redis01:/etc/redis
depends_on:
- redis02
- redis03
sentinel02:
image: redis:sentinel
container_name: sentinel02
hostname: sentinel02
networks:
redis-network:
ipv4_address: 172.23.0.15
volumes:
- ./data/redis02:/var/lib/redis
- ${PWD}/redis02:/etc/redis
depends_on:
- redis02
- redis03
- sentinel01
sentinel03:
image: redis:sentinel
container_name: sentinel03
hostname: sentinel03
networks:
redis-network:
ipv4_address: 172.23.0.16
volumes:
- ./data/redis03:/var/lib/redis
- ${PWD}/redis03:/etc/redis
depends_on:
- redis02
- redis03
- sentinel01
haproxy:
image: redis:haproxy
container_name: haproxy
hostname: haproxy
ports:
- 6379:6379
- 8080:8080
networks:
redis-network:
ipv4_address: 172.23.0.17
volumes:
- ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
depends_on:
- sentinel03
networks:
redis-network:
name: redis-network
external: true
ipam:
config:
- subnet: 172.23.0.0/24