forked from spin/redis-cluster-local-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
73 lines (72 loc) · 1.92 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
version: '3.4'
services:
redis-node1:
build:
context: redis
ports:
- "7000:7000"
- "17000:17000"
restart: always
entrypoint: [redis-server, /etc/redis/rediscluster.conf, --port,"7000", --cluster-announce-ip,"${ip}"]
redis-node2:
build:
context: redis
ports:
- "7001:7001"
- "17001:17001"
restart: always
entrypoint: [redis-server, /etc/redis/rediscluster.conf, --port,"7001",--cluster-announce-ip,"${ip}"]
redis-node3:
build:
context: redis
ports:
- "7002:7002"
- "17002:17002"
restart: always
entrypoint: [redis-server, /etc/redis/rediscluster.conf, --port,"7002",--cluster-announce-ip,"${ip}"]
redis-node4:
build:
context: redis
ports:
- "7003:7003"
- "17003:17003"
restart: always
entrypoint: [redis-server, /etc/redis/rediscluster.conf, --port,"7003",--cluster-announce-ip,"${ip}"]
depends_on:
- redis-node1
- redis-node2
- redis-node3
redis-node5:
build:
context: redis
ports:
- "7004:7004"
- "17004:17004"
restart: always
entrypoint: [redis-server, /etc/redis/rediscluster.conf, --port,"7004",--cluster-announce-ip,"${ip}"]
depends_on:
- redis-node1
- redis-node2
- redis-node3
redis-node6:
build:
context: redis
ports:
- "7005:7005"
- "17005:17005"
restart: always
entrypoint: [redis-server, /etc/redis/rediscluster.conf, --port,"7005",--cluster-announce-ip,"${ip}"]
depends_on:
- redis-node1
- redis-node2
- redis-node3
redis-cluster-creator:
image: redis:6.0.3
entrypoint: [/bin/sh,-c,'echo "yes" | redis-cli --cluster create ${ip}:7000 ${ip}:7001 ${ip}:7002 ${ip}:7003 ${ip}:7004 ${ip}:7005 --cluster-replicas 1']
depends_on:
- redis-node1
- redis-node2
- redis-node3
- redis-node4
- redis-node5
- redis-node6