-
-
Notifications
You must be signed in to change notification settings - Fork 88
/
Copy pathcompose.yaml
38 lines (37 loc) · 826 Bytes
/
compose.yaml
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
version: '3.8'
services:
jqplay:
build:
context: .
dockerfile: Dockerfile.dev
container_name: jqplay
environment:
NODE_ENV: development
DATABASE_URL: postgres://postgres:postgres@pg:5432/jqplay
command: >
sh -c "npx prisma migrate dev && npm run dev"
ports:
- "3000:3000"
depends_on:
pg:
condition: service_healthy
volumes:
- .:/app
- /app/node_modules
- /app/.next
restart: unless-stopped
pg:
image: postgres:16
container_name: pg
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: jqplay
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5