-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
55 lines (52 loc) · 1.21 KB
/
docker-compose.dev.yml
File metadata and controls
55 lines (52 loc) · 1.21 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
version: '3.8'
# Development environment with hot reload
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: traffic-backend-dev
ports:
- "5000:5000"
volumes:
# mount source code for hot reload
- ./backend:/app
- /app/__pycache__
# Persist data
- ./backend/uploads:/app/uploads
- ./backend/outputs:/app/outputs
- ./backend/data:/app/data
environment:
- FLASK_ENV=development
- FLASK_DEBUG=1
- DEBUG_UPLOAD=1
- PYTHONUNBUFFERED=1
command: python app.py
restart: unless-stopped
networks:
- traffic-network
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.dev
container_name: traffic-frontend-dev
ports:
- "3000:3000"
volumes:
# mount source for hot reload
- ./frontend/src:/app/src
- ./frontend/public:/app/public
- /app/node_modules
environment:
- CHOKIDAR_USEPOLLING=true
- REACT_APP_API_URL=http://localhost:5000
depends_on:
- backend
restart: unless-stopped
networks:
- traffic-network
stdin_open: true
tty: true
networks:
traffic-network:
driver: bridge