-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.redis-cluster.yml
85 lines (78 loc) · 2.41 KB
/
docker-compose.redis-cluster.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
81
82
83
84
version: '3'
services:
redis-node-0:
image: docker.io/bitnami/redis-cluster:6.2
volumes:
- ./data/redis-cluster_data-0:/bitnami/redis/data
networks:
- backend
environment:
- 'REDIS_PASSWORD=jonny'
- 'REDIS_NODES=redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5'
redis-node-1:
image: docker.io/bitnami/redis-cluster:6.2
volumes:
- ./data/redis-cluster_data-1:/bitnami/redis/data
networks:
- backend
environment:
- 'REDIS_PASSWORD=jonny'
- 'REDIS_NODES=redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5'
redis-node-2:
image: docker.io/bitnami/redis-cluster:6.2
volumes:
- ./data/redis-cluster_data-2:/bitnami/redis/data
networks:
- backend
environment:
- 'REDIS_PASSWORD=jonny'
- 'REDIS_NODES=redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5'
redis-node-3:
image: docker.io/bitnami/redis-cluster:6.2
volumes:
- ./data/redis-cluster_data-3:/bitnami/redis/data
networks:
- backend
environment:
- 'REDIS_PASSWORD=jonny'
- 'REDIS_NODES=redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5'
redis-node-4:
image: docker.io/bitnami/redis-cluster:6.2
volumes:
- ./data/redis-cluster_data-4:/bitnami/redis/data
networks:
- backend
environment:
- 'REDIS_PASSWORD=jonny'
- 'REDIS_NODES=redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5'
redis-node-5:
image: docker.io/bitnami/redis-cluster:6.2
volumes:
- ./data/redis-cluster_data-5:/bitnami/redis/data
networks:
- backend
depends_on:
- redis-node-0
- redis-node-1
- redis-node-2
- redis-node-3
- redis-node-4
environment:
- 'REDIS_PASSWORD=jonny'
- 'REDISCLI_AUTH=jonny'
- 'REDIS_CLUSTER_REPLICAS=1'
- 'REDIS_NODES=redis-node-0 redis-node-1 redis-node-2 redis-node-3 redis-node-4 redis-node-5'
- 'REDIS_CLUSTER_CREATOR=yes'
# if you want to use another redis desktop manager, you must run this container
# it need to connect redis-cluster by ssh
# ssh 127.0.0.1:34555
# redis node: docker-own_redis-node-0_1:6379
sshd:
image: jonny-sshd
build:
context: ./config/redis-cluster-sshd
container_name: sshd
networks:
- backend
ports:
- "34555:22"