-
Notifications
You must be signed in to change notification settings - Fork 12
/
docker-compose.yml
50 lines (45 loc) · 1.1 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
48
49
50
version: '3.8'
services:
ai_ml:
build:
context: . # Set the build context to the root directory
dockerfile: ./ai_ml/Dockerfile # Reference the Dockerfile within ai_ml
container_name: ai_ml_service
ports:
- "5000:5000"
restart: unless-stopped
depends_on:
- mongodb
backend:
build:
context: .
dockerfile: backend/Dockerfile # Specify the Dockerfile path relative to the root
container_name: backend_service
ports:
- "8000:8000"
environment:
- AI_ML_URL=http://ai_ml:5000 # Ensure backend points to ai_ml service
depends_on:
- ai_ml
- mongodb
restart: unless-stopped
frontend:
build:
context: ./frontend
container_name: frontend_service
ports:
- "3000:3000"
environment:
- REACT_APP_BACKEND_URL=http://backend:8000 # Ensure frontend points to backend service
depends_on:
- backend
restart: unless-stopped
mongodb:
image: mongo:latest
container_name: mongodb
ports:
- "27017:27017"
volumes:
- mongo_data:/data/db
volumes:
mongo_data: