-
Notifications
You must be signed in to change notification settings - Fork 152
/
docker-compose-redis-cluster.yaml
39 lines (36 loc) · 1.35 KB
/
docker-compose-redis-cluster.yaml
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
x-redis-cluster-base: &redis-cluster-base
image: docker.io/bitnami/redis-cluster:latest
network_mode: host
services:
redis-cluster-1:
container_name: redis-cluster-1
<<: *redis-cluster-base
environment:
- 'ALLOW_EMPTY_PASSWORD=yes'
- 'REDIS_NODES=127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7003'
- 'REDIS_CLUSTER_DYNAMIC_IPS=no'
- 'REDIS_CLUSTER_ANNOUNCE_IP=127.0.0.1'
- 'REDIS_PORT_NUMBER=7001'
redis-cluster-2:
container_name: redis-cluster-2
<<: *redis-cluster-base
environment:
- 'ALLOW_EMPTY_PASSWORD=yes'
- 'REDIS_NODES=127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7003'
- 'REDIS_CLUSTER_DYNAMIC_IPS=no'
- 'REDIS_CLUSTER_ANNOUNCE_IP=127.0.0.1'
- 'REDIS_PORT_NUMBER=7002'
redis-cluster-3:
container_name: redis-cluster-3
<<: *redis-cluster-base
depends_on:
- redis-cluster-1
- redis-cluster-2
environment:
- 'ALLOW_EMPTY_PASSWORD=yes'
- 'REDIS_NODES=127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7003'
- 'REDIS_CLUSTER_DYNAMIC_IPS=no'
- 'REDIS_CLUSTER_ANNOUNCE_IP=127.0.0.1'
- 'REDIS_PORT_NUMBER=7003'
- 'REDIS_CLUSTER_REPLICAS=0'
- 'REDIS_CLUSTER_CREATOR=yes'