-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
48 lines (45 loc) · 976 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
services:
db:
image: postgres:13.2-alpine
container_name: db
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: pg-local
PGDATA: /pgdata
POSTGRES_HOST_AUTH_METHOD: trust
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 3s
retries: 5
volumes:
- ./data/pg-local:/pgdata
ports:
- 5432:5432
api:
container_name: api
build:
context: ./packages
dockerfile: Dockerfile.api
depends_on:
db:
condition: service_healthy
links:
- db:db
volumes:
- ./packages/api:/api
- /api/node_modules
ports:
- 3001:3001
frontend:
container_name: frontend
build:
context: ./packages
dockerfile: Dockerfile.frontend
volumes:
- ./packages/frontend:/frontend
- /frontend/node_modules
- /frontend/.next
ports:
- 3000:3000