-
-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
39 lines (36 loc) · 746 Bytes
/
docker-compose.yml
File metadata and controls
39 lines (36 loc) · 746 Bytes
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
version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile
ports:
- "3000:3000"
env_file:
- .env
volumes:
- .:/app
- /app/node_modules
command: sh -c "npx prisma migrate dev && npm run dev"
depends_on:
postgres-dev:
condition: service_healthy
postgres-dev:
image: postgres:latest
restart: always
ports:
- '5432:5432'
env_file:
- .env
environment:
- POSTGRES_DB="dev"
volumes:
- postgres-dev-data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-U", "postgres" ]
interval: 15s
timeout: 5s
retries: 5
start_period: 5s
volumes:
postgres-dev-data: