-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
56 lines (54 loc) · 1.29 KB
/
docker-compose.dev.yml
File metadata and controls
56 lines (54 loc) · 1.29 KB
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
53
54
55
56
services:
api:
build:
context: ./apps/api
dockerfile: Dockerfile.dev
container_name: api
command: sh -c "npm run db:generate && npm run db:migrate && npm run dev"
ports:
- ${PORT:-3001}:3000
restart: unless-stopped
environment:
PORT: 3000
DATABASE_URL: ${DATABASE_URL:-file:./dev.db}
JWT_SECRET: ${JWT_SECRET:-secret}
URL_DEPLOY: ${URL_DEPLOY:-http://localhost:${PORT:-3001}}
volumes:
- ./apps/api/src:/app/src
- ./apps/api/prisma/:/app/prisma/
- ./apps/api/docs:/app/docs
healthcheck:
test: [ "CMD", "lsof", "-t", "-i:3000" ]
interval: 1m30s
timeout: 30s
retries: 5
start_period: 30s
networks:
- app_net
web:
build:
context: ./apps/web
dockerfile: Dockerfile.dev
container_name: web
ports:
- ${PORT:-3002}:3000
restart: unless-stopped
environment:
PORT: 3000
NEXT_PUBLIC_API_URL: ${API_URL:-http://api:3000}
volumes:
- ./apps/web/src:/app/src
healthcheck:
test: [ "CMD", "lsof", "-t", "-i:3000" ]
interval: 1m30s
timeout: 30s
retries: 5
start_period: 30s
networks:
- app_net
depends_on:
api:
condition: service_healthy
networks:
app_net:
driver: bridge