-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
46 lines (42 loc) · 1.18 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
version: "3.8"
services:
database:
image: "postgres:15.2"
restart: always
env_file:
- database.env
ports:
- "5435:5432"
volumes:
- /var/docker-volumes/postgres-data:/var/lib/postgresql/data/
master:
container_name: redis-chat-master
hostname: redis-chat-cache
image: redis:latest
ports:
- "6379:6379"
restart: on-failure
volumes:
- /var/docker-volumes/redis-data:/data
command: redis-server --requirepass admin
replica-1:
container_name: redis-chat-replica-1
image: redis:latest
ports:
- "6380:6379"
command: redis-server --slaveof redis-chat-master 6379 --masterauth admin
replica-2:
container_name: redis-chat-replica-2
image: redis:latest
ports:
- "6381:6379"
command: redis-server --slaveof redis-chat-master 6379 --masterauth admin
redis-commander:
container_name: redis-commander
hostname: redis-commander
image: rediscommander/redis-commander:latest
restart: always
environment:
- REDIS_HOSTS=local:redis-chat-cache:6379:0:admin,redis-chat-replica-1:redis-chat-replica-1,redis-chat-replica-2:redis-chat-replica-2
ports:
- "8081:8081"