forked from liaoliaots/nestjs-redis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
86 lines (82 loc) · 2.73 KB
/
compose.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
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
# initialize:
# sudo docker compose exec cluster-1_master-1 redis-cli --cluster create 127.0.0.1:16380 127.0.0.1:16381 127.0.0.1:16382 --cluster-yes
# sudo docker compose exec cluster-2_master-1 redis-cli --cluster create 127.0.0.1:16480 127.0.0.1:16481 127.0.0.1:16482 --cluster-yes
services:
cluster-1_master-1:
image: bitnami/redis-cluster:latest
environment:
- REDIS_PORT_NUMBER=16380
- REDIS_PASSWORD=cluster1
- REDIS_NODES=cluster-1_master-1 cluster-1_master-2 cluster-1_master-3
- REDIS_CLUSTER_DYNAMIC_IPS=no
- REDIS_CLUSTER_ANNOUNCE_IP=0.0.0.0
- REDISCLI_AUTH=cluster1
network_mode: host
cluster-1_master-2:
image: bitnami/redis-cluster:latest
environment:
- REDIS_PORT_NUMBER=16381
- REDIS_PASSWORD=cluster1
- REDIS_NODES=cluster-1_master-1 cluster-1_master-2 cluster-1_master-3
- REDIS_CLUSTER_DYNAMIC_IPS=no
- REDIS_CLUSTER_ANNOUNCE_IP=0.0.0.0
network_mode: host
cluster-1_master-3:
image: bitnami/redis-cluster:latest
environment:
- REDIS_PORT_NUMBER=16382
- REDIS_PASSWORD=cluster1
- REDIS_NODES=cluster-1_master-1 cluster-1_master-2 cluster-1_master-3
- REDIS_CLUSTER_DYNAMIC_IPS=no
- REDIS_CLUSTER_ANNOUNCE_IP=0.0.0.0
network_mode: host
cluster-2_master-1:
image: bitnami/redis-cluster:latest
environment:
- REDIS_PORT_NUMBER=16480
- REDIS_PASSWORD=cluster2
- REDIS_NODES=cluster-2_master-1 cluster-2_master-2 cluster-2_master-3
- REDIS_CLUSTER_DYNAMIC_IPS=no
- REDIS_CLUSTER_ANNOUNCE_IP=0.0.0.0
- REDISCLI_AUTH=cluster2
network_mode: host
cluster-2_master-2:
image: bitnami/redis-cluster:latest
environment:
- REDIS_PORT_NUMBER=16481
- REDIS_PASSWORD=cluster2
- REDIS_NODES=cluster-2_master-1 cluster-2_master-2 cluster-2_master-3
- REDIS_CLUSTER_DYNAMIC_IPS=no
- REDIS_CLUSTER_ANNOUNCE_IP=0.0.0.0
network_mode: host
cluster-2_master-3:
image: bitnami/redis-cluster:latest
environment:
- REDIS_PORT_NUMBER=16482
- REDIS_PASSWORD=cluster2
- REDIS_NODES=cluster-2_master-1 cluster-2_master-2 cluster-2_master-3
- REDIS_CLUSTER_DYNAMIC_IPS=no
- REDIS_CLUSTER_ANNOUNCE_IP=0.0.0.0
network_mode: host
redis-1:
image: bitnami/redis:latest
environment:
- REDIS_PORT_NUMBER=6380
- ALLOW_EMPTY_PASSWORD=yes
networks:
- dev
ports:
- '6380:6380'
command: /opt/bitnami/scripts/redis/run.sh --maxmemory 16mb
redis-2:
image: bitnami/redis:latest
environment:
- REDIS_PORT_NUMBER=6381
- ALLOW_EMPTY_PASSWORD=yes
networks:
- dev
ports:
- '6381:6381'
command: /opt/bitnami/scripts/redis/run.sh --maxmemory 16mb
networks:
dev: