-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompose.redis.yml
More file actions
78 lines (74 loc) · 2.25 KB
/
compose.redis.yml
File metadata and controls
78 lines (74 loc) · 2.25 KB
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
services:
cache:
image: redis:7.4.0
restart: always
container_name: redis
command: ["bash", "-c", "mkdir -p /etc/redis-config && cp /redis.conf /etc/redis-config/redis.conf && redis-server /etc/redis-config/redis.conf"]
networks:
dnsnetwork:
ipv4_address: 10.5.0.10
ports:
- '6379:6379'
volumes:
- ./bootstrap/redis/master/redis.conf:/redis.conf
- cache:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3
redis_replica:
image: redis:7.4.0
restart: always
container_name: redis_replica
command: ["bash", "-c", "mkdir -p /etc/redis-config && cp /redis.conf /etc/redis-config/redis.conf && redis-server /etc/redis-config/redis.conf"]
networks:
dnsnetwork:
ipv4_address: 10.5.0.11
volumes:
- ./bootstrap/redis/replica/replica.conf:/redis.conf
- ./data/replica_1:/data
healthcheck:
test: ["CMD", "redis-cli", "-p", "6380", "ping"]
interval: 10s
timeout: 5s
retries: 3
redis_replica_dns:
image: redis:7.4.0
restart: always
container_name: redis_replica_dns
command: ["bash", "-c", "mkdir -p /etc/redis-config && cp /redis.conf /etc/redis-config/redis.conf && redis-server /etc/redis-config/redis.conf"]
networks:
dnsnetwork:
ipv4_address: 10.5.0.20
volumes:
- ./bootstrap/redis/replica/replica-dns.conf:/redis.conf
- ./data/replica_2:/data
depends_on:
- cache
healthcheck:
test: ["CMD", "redis-cli", "-p", "6380", "ping"]
interval: 10s
timeout: 5s
retries: 3
redis_sentinel:
image: redis:7.4.0
restart: always
container_name: redis_sentinel
command: ["bash", "-c", "mkdir -p /etc/redis-config && cp /redis.conf /etc/redis-config/sentinel.conf && redis-server /etc/redis-config/sentinel.conf --sentinel"]
networks:
dnsnetwork:
ipv4_address: 10.5.0.21
volumes:
- ./bootstrap/redis/sentinel/sentinel.conf:/redis.conf
depends_on:
- cache
- redis_replica
- redis_replica_dns
healthcheck:
test: ["CMD", "redis-cli", "-p", "26379", "-a", "sentinelpass", "ping"]
interval: 10s
timeout: 5s
retries: 3
volumes:
cache: