forked from limitd/limitdb
-
Notifications
You must be signed in to change notification settings - Fork 12
/
docker-compose-cluster.yml
43 lines (43 loc) · 1.49 KB
/
docker-compose-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
services:
redis-1:
image: 'redis:6'
healthcheck:
interval: "1s"
test: [ "CMD", "redis-cli", "-p", "16371", "ping", "|", "grep", "PONG" ]
command: ["redis-server", "/etc/redis/redis.conf"]
volumes:
- ${PWD}/test-resources/redis-cluster/node-1/conf/redis.conf:/etc/redis/redis.conf
network_mode: host
redis-2:
image: 'redis:6'
healthcheck:
interval: "1s"
test: [ "CMD", "redis-cli", "-p", "16372", "ping", "|", "grep", "PONG" ]
command: [ "redis-server", "/etc/redis/redis.conf" ]
volumes:
- ${PWD}/test-resources/redis-cluster/node-2/conf/redis.conf:/etc/redis/redis.conf
network_mode: host
redis-3:
image: 'redis:6'
healthcheck:
interval: "1s"
test: [ "CMD", "redis-cli", "-p", "16373", "ping", "|", "grep", "PONG" ]
command: [ "redis-server", "/etc/redis/redis.conf" ]
volumes:
- ${PWD}/test-resources/redis-cluster/node-3/conf/redis.conf:/etc/redis/redis.conf
network_mode: host
redis-cluster-create:
image: 'redis:6'
command: '/usr/local/etc/redis/redis-cluster-create.sh'
depends_on:
redis-1:
condition: service_healthy
redis-2:
condition: service_healthy
redis-3:
condition: service_healthy
volumes:
- ${PWD}/test-resources/redis-cluster/redis-cluster-create.sh:/usr/local/etc/redis/redis-cluster-create.sh
network_mode: host
healthcheck:
test: ["CMD-SHELL", "redis-cli -p 16371 -c cluster info | grep cluster_state:ok"]