-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
52 lines (48 loc) · 1.15 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
version: "3.8"
services:
redis:
image: redis:latest # Use the latest Redis image
ports:
- "6379:6379" # Map port 6379 on the host to port 6379 on the container
volumes:
- cache:/data
- ./redis/redis.conf:/usr/local/etc/redis/redis.conf
command: ["redis-server", "/usr/local/etc/redis/redis.conf"]
database:
container_name: database
image: postgres:15.6
restart: always
environment:
- POSTGRES_USER=pg
- POSTGRES_PASSWORD=pg_pass123
- POSTGRES_DB=task
ports:
- 5434:5432
volumes:
- db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U pg -d task"]
interval: 10s
timeout: 5s
retries: 5
databaseoauth:
container_name: database_oauth
image: postgres:15.6
restart: always
environment:
- POSTGRES_USER=pg
- POSTGRES_PASSWORD=pg_pass123
- POSTGRES_DB=oauth
volumes:
- dboauth:/var/lib/postgresql/data
ports:
- 5433:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U pg -d oauth"]
interval: 10s
timeout: 5s
retries: 5
volumes:
db:
dboauth:
cache: