-
-
Notifications
You must be signed in to change notification settings - Fork 103
/
docker-compose.yml
47 lines (44 loc) · 1.09 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
44
45
46
47
version: '3.8'
services:
frontend:
build:
context: .
dockerfile: Dockerfile
target: frontend-build # Reference the frontend build stage
working_dir: /app/frontend
volumes:
- ./frontend:/app/frontend # Bind-mount the frontend code to support hot-reloading
ports:
- "5173:5173"
command: ["npm", "run", "dev"]
environment:
- NODE_ENV=development
backend:
build:
context: .
dockerfile: Dockerfile
target: backend-build # Reference the backend build stage
working_dir: /app/backend
volumes:
- ./backend:/app/backend # Bind-mount the backend code to support hot-reloading
ports:
- "3000:3000"
command: ["npm", "run", "dev"]
environment:
- NODE_ENV=development
full-app:
build:
context: .
dockerfile: Dockerfile
depends_on:
- frontend
- backend
ports:
- "5173:5173"
- "3000:3000"
command: ["sh", "./start.sh"]
environment:
- NODE_ENV=production
volumes:
- ./frontend:/app/frontend
- ./backend:/app/backend