-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
52 lines (52 loc) · 1021 Bytes
/
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
services:
web:
build:
context: .
dockerfile: ./apps/web/Dockerfile
restart: always
ports:
- 3000:3000
env_file:
- ./.env.production
api:
build:
context: .
dockerfile: ./apps/api/Dockerfile
restart: always
ports:
- 5400:5400
env_file:
- ./.env.production
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
redis:
image: redis:latest
ports:
- 6379:6379
env_file:
- ./.env.production
command: [
"redis-server",
"--requirepass", "${REDIS_PASSWORD}"
]
volumes:
- redis_data:/var/lib/redis/data
postgres:
image: postgres:alpine
ports:
- 5432:5432
env_file:
- ./.env.production
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: [CMD-SHELL, pg_isready -U postgres]
interval: 5s
timeout: 10s
retries: 5
volumes:
postgres_data:
redis_data: