forked from otovo/redis-rate-limiters
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
80 lines (69 loc) · 1.51 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
version: '3'
services:
# Standalone instance
redis-standalone:
image: redis:alpine
command: redis-server --appendonly yes
ports:
- '127.0.0.1:6378:6379'
# Cluster
redis-leader-1:
image: redis:latest
restart: always
ports:
- "127.0.0.1:6380:6379"
networks:
redis:
ipv4_address: 10.5.0.2
command: redis-server --cluster-enabled yes
redis-leader-2:
image: redis:latest
restart: always
ports:
- "127.0.0.1:6381:6379"
networks:
redis:
ipv4_address: 10.5.0.3
command: redis-server --cluster-enabled yes
redis-leader-3:
image: redis:latest
restart: always
ports:
- "127.0.0.1:6382:6379"
networks:
redis:
ipv4_address: 10.5.0.4
command: redis-server --cluster-enabled yes
redis-follower-1:
image: redis:latest
restart: always
ports:
- "127.0.0.1:6383:6379"
networks:
redis:
ipv4_address: 10.5.0.5
command: redis-server --cluster-enabled yes
redis-follower-2:
image: redis:latest
restart: always
ports:
- "127.0.0.1:6384:6379"
networks:
redis:
ipv4_address: 10.5.0.6
command: redis-server --cluster-enabled yes
redis-follower-3:
image: redis:latest
restart: always
ports:
- "127.0.0.1:6385:6379"
networks:
redis:
ipv4_address: 10.5.0.7
command: redis-server --cluster-enabled yes
networks:
redis:
driver: bridge
ipam:
config:
- subnet: 10.5.0.0/16