-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
82 lines (76 loc) · 1.64 KB
/
docker-compose.yml
File metadata and controls
82 lines (76 loc) · 1.64 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
version: '3.8'
services:
# MongoDB Database
mongodb:
image: mongo:7.0
container_name: cleanairsight-mongodb
restart: unless-stopped
ports:
- "27017:27017"
volumes:
- mongodb_data:/data/db
environment:
MONGO_INITDB_DATABASE: cleanairsight
networks:
- cleanairsight-network
# Redis Cache
redis:
image: redis:7-alpine
container_name: cleanairsight-redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- cleanairsight-network
# Backend API
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: cleanairsight-backend
restart: unless-stopped
ports:
- "8000:8000"
volumes:
- ./backend:/app
- ./data:/app/data
- ./models:/app/models
environment:
- MONGODB_URI=mongodb://mongodb:27017/cleanairsight
- REDIS_URL=redis://redis:6379
- API_HOST=0.0.0.0
- API_PORT=8000
env_file:
- .env
depends_on:
- mongodb
- redis
networks:
- cleanairsight-network
command: uvicorn main:app --host 0.0.0.0 --port 8000 --reload
# Frontend
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: cleanairsight-frontend
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- ./frontend:/app
- /app/node_modules
environment:
- VITE_API_URL=http://localhost:8000
depends_on:
- backend
networks:
- cleanairsight-network
volumes:
mongodb_data:
redis_data:
networks:
cleanairsight-network:
driver: bridge