-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
94 lines (88 loc) · 2.25 KB
/
Copy pathdocker-compose.yml
File metadata and controls
94 lines (88 loc) · 2.25 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
83
84
85
86
87
88
89
90
91
92
93
94
version: '3.8'
services:
# 1. Redis Caching & Rate Limiting Service
redis:
image: redis:7-alpine
container_name: lms-redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- lms-network
# 2. Python Computer Vision & YOLOv8 Proctoring Microservice
ai_proctoring:
build:
context: ./backend/ai_proctoring
dockerfile: Dockerfile
container_name: lms-ai-proctoring
restart: unless-stopped
ports:
- "5001:5001"
environment:
- PORT=5001
- PYTHONUNBUFFERED=1
networks:
- lms-network
# 3. Express & Node.js Core Backend
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: lms-backend
restart: unless-stopped
ports:
- "8000:8000"
environment:
- PORT=8000
- NODE_ENV=production
- MONGODB_URL=${MONGODB_URL}
- JWT_SECRET=${JWT_SECRET}
- FRONTEND_URL=${FRONTEND_URL:-http://localhost:5173}
- REDIS_URL=redis://redis:6379
- YOLO_SERVICE_URL=http://ai_proctoring:5001
- CLOUDINARY_CLOUD_NAME=${CLOUDINARY_CLOUD_NAME}
- CLOUDINARY_API_KEY=${CLOUDINARY_API_KEY}
- CLOUDINARY_API_SECRET=${CLOUDINARY_API_SECRET}
- RAZORPAY_KEY_ID=${RAZORPAY_KEY_ID}
- RAZORPAY_SECRET=${RAZORPAY_SECRET}
- EMAIL=${EMAIL}
- EMAIL_PASS=${EMAIL_PASS}
- GROQ_API_KEY=${GROQ_API_KEY}
- FIREBASE_PROJECT_ID=${FIREBASE_PROJECT_ID}
- FIREBASE_CLIENT_EMAIL=${FIREBASE_CLIENT_EMAIL}
- FIREBASE_PRIVATE_KEY=${FIREBASE_PRIVATE_KEY}
depends_on:
redis:
condition: service_healthy
ai_proctoring:
condition: service_started
networks:
- lms-network
# 4. React 19 & Vite Frontend (Nginx)
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
- VITE_API_URL=${VITE_API_URL:-http://localhost:8000}
container_name: lms-frontend
restart: unless-stopped
ports:
- "5173:80"
depends_on:
- backend
networks:
- lms-network
volumes:
redis_data:
driver: local
networks:
lms-network:
driver: bridge