-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
38 lines (34 loc) · 909 Bytes
/
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
version: "3.8"
services:
frontend:
depends_on:
- backend
build: ./frontend
volumes:
- ./frontend:/app # Mount local frontend code to /app in the container
- /app/node_modules # Prevent overwriting node_modules
ports:
- "4000:3000"
environment:
- CHOKIDAR_USEPOLLING=true # Enable polling for file watching
- CI=true # Disable interactive mode, useful for React in Docker
backend:
depends_on:
- db
build: ./backend
volumes:
- ./backend:/app # Mount local backend code to /app in the container
- /app/node_modules # Prevent overwriting node_modules
ports:
- "3001:3001"
environment:
DB_URL: mongodb://db/vidly
command: /app/docker-entrypoint.sh # Use absolute path
db:
image: mongo:4.0-xenial
ports:
- "27017:27017"
volumes:
- vidly:/data/db
volumes:
vidly: