forked from hendisantika/spring-data-redis-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
54 lines (51 loc) · 1.12 KB
/
docker-compose.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
version: '2'
networks:
app-tier:
driver: bridge
services:
app:
build: .
networks:
- app-tier
ports:
- '8092:8080'
# add this to Dockerfile to be able to debug from IDE: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005
- '5005:5005'
environment:
SPRING_PROFILES_ACTIVE: sentinel
depends_on:
- redis-sentinel
redis:
image: 'bitnami/redis:6.0'
environment:
- REDIS_REPLICATION_MODE=master
- ALLOW_EMPTY_PASSWORD=yes
networks:
- app-tier
ports:
- '8000:6379'
redis-slave:
image: 'bitnami/redis:6.0'
environment:
- REDIS_REPLICATION_MODE=slave
- REDIS_MASTER_HOST=redis
- ALLOW_EMPTY_PASSWORD=yes
ports:
- '8001:6379'
depends_on:
- redis
networks:
- app-tier
redis-sentinel:
image: 'bitnami/redis-sentinel:6.0'
environment:
- ALLOW_EMPTY_PASSWORD=yes
- REDIS_SENTINEL_QUORUM=1
- REDIS_SENTINEL_DOWN_AFTER_MILLISECONDS=30000
depends_on:
- redis
- redis-slave
ports:
- '26379:26379'
networks:
- app-tier