-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
33 lines (30 loc) · 843 Bytes
/
Copy pathdocker-compose.dev.yml
File metadata and controls
33 lines (30 loc) · 843 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
services:
postgres:
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 5s
timeout: 3s
retries: 20
backend:
user: root
command: sh -lc "sleep 5 && npm ci --no-audit --no-fund && npx prisma generate && npx prisma migrate deploy && npm run start"
volumes:
- backend_node_modules:/app/node_modules
depends_on:
postgres:
condition: service_healthy
healthcheck:
test:
[
'CMD-SHELL',
'node -e "http=require(''http''); http.get(''http://localhost:3000/products'', res=>{process.exit(res.statusCode===200?0:1)}).on(''error'',()=>process.exit(1))"',
]
interval: 5s
timeout: 3s
retries: 20
frontend:
depends_on:
backend:
condition: service_healthy
volumes:
backend_node_modules: