-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yml
74 lines (70 loc) · 1.83 KB
/
docker-compose.dev.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
services:
frontend:
build:
context: .
dockerfile: Dockerfile-Frontend.dev # Consistent naming with production Dockerfile
ports:
- "${FRONTEND_PORT:-3000}:3000"
environment:
- NODE_ENV=${FRONTEND_NODE_ENV:-development}
- API_URL=http://backend:${BACKEND_PORT:-5000} # Enables internal network communication
- PORT=${FRONTEND_PORT:-3000}
- CHOKIDAR_USEPOLLING=true
volumes:
- ./frontend:/app
- ./shared:/shared
- /app/node_modules
command: "npm run dev"
depends_on:
- backend
networks:
- app-network
develop:
watch:
- action: sync
path: ./frontend/src
target: /app/src
ignore:
- node_modules/
- dist/
- action: sync
path: ./shared
target: /shared
- action: rebuild
path: ./frontend/package.json
- action: rebuild
path: ./frontend/package-lock.json
backend:
build:
context: ./
dockerfile: Dockerfile-Backend.dev
ports:
- "${BACKEND_PORT:-5000}:5000"
environment:
- NODE_ENV=${BACKEND_NODE_ENV:-development}
- PORT=${BACKEND_PORT:-5000}
- POSTGRES_CONNECTION_STRING=${POSTGRES_CONNECTION_STRING:?Missing Postgres connection string}
volumes:
- ./backend:/app
- /app/node_modules
command: "npm run dev"
networks:
- app-network
develop:
watch:
- action: sync
path: ./backend/src
target: /app/src
ignore:
- node_modules/
- dist/
- action: sync
path: ./shared
target: /shared
- action: rebuild
path: ./backend/package.json
- action: rebuild
path: ./backend/package-lock.json
networks:
app-network:
driver: bridge