-
Notifications
You must be signed in to change notification settings - Fork 71
/
compose.yaml
20 lines (19 loc) · 987 Bytes
/
compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# sudo docker compose exec cluster-m1 redis-cli -a mycluster --cluster create 127.0.0.1:7380 127.0.0.1:7381 127.0.0.1:7382 --cluster-yes
services:
redis:
image: redis/redis-stack-server:latest
network_mode: host
environment:
- 'REDIS_ARGS=--port 6380 --requirepass myredis --appendonly yes'
cluster-m1:
image: redis:latest
network_mode: host
command: 'redis-server --port 7380 --requirepass mycluster --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 5000 --appendonly yes'
cluster-m2:
image: redis:latest
network_mode: host
command: 'redis-server --port 7381 --requirepass mycluster --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 5000 --appendonly yes'
cluster-m3:
image: redis:latest
network_mode: host
command: 'redis-server --port 7382 --requirepass mycluster --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 5000 --appendonly yes'