-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
44 lines (41 loc) · 1.02 KB
/
docker-compose.yml
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
services:
backend:
build:
context: .
dockerfile: Dockerfile.backend
target: runtime
volumes:
- ./backend:/app/backend
- ./frontend/build:/app/backend/public # Map built frontend assets to Express public folder
environment:
NODE_ENV: development
ports:
- "5000:5000"
networks:
- private_net
profiles:
- dev
deploy:
resources:
limits:
cpus: '1'
memory: '2g'
frontend:
build:
context: .
dockerfile: Dockerfile.frontend
target: build
volumes:
- ./frontend:/app/frontend # Map frontend source for live rebuilds
- ./frontend/build:/app/frontend/build # Ensure frontend builds are accessible to backend
command: ["npm", "run", "build", "--", "--watch"] # Watch for changes and rebuild
networks:
- private_net
profiles:
- dev
networks:
private_net:
driver: bridge
ipam:
config:
- subnet: 172.63.0.0/16