-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
59 lines (56 loc) · 1.46 KB
/
docker-compose.dev.yml
File metadata and controls
59 lines (56 loc) · 1.46 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
57
58
59
version: '3.8'
services:
# Next.js Application (Development)
app:
build:
context: .
dockerfile: Dockerfile
target: dev
container_name: foundrly-app-dev
ports:
- "3000:3000"
volumes:
# Mount source code for hot reload
- .:/app
# Exclude node_modules to use container's version
- /app/node_modules
# Exclude .next for better performance
- /app/.next
# Exclude .git for performance
- /app/.git
# Cache npm cache
- npm-cache:/root/.npm
environment:
- NODE_ENV=development
- WATCHPACK_POLLING=true
- CHOKIDAR_USEPOLLING=true
- NEXT_TELEMETRY_DISABLED=1
- WATCHPACK_POLLING_INTERVAL=1000
- CHOKIDAR_INTERVAL=1000
# Memory optimization for 8GB RAM
- NODE_OPTIONS=--max-old-space-size=2048
networks:
- foundrly-network
restart: unless-stopped
# Enable hot reload with polling for Windows/WSL2
command: npm run dev
# Health check for development (disabled for now)
# healthcheck:
# test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/health"]
# interval: 30s
# timeout: 10s
# retries: 3
# start_period: 60s
# Memory limits for 8GB RAM system
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 1G
volumes:
npm-cache:
driver: local
networks:
foundrly-network:
driver: bridge