-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
86 lines (80 loc) · 1.88 KB
/
Copy pathdocker-compose.yml
File metadata and controls
86 lines (80 loc) · 1.88 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
version: "3.8"
services:
# MongoDB Database
mongo:
image: mongo:7.0
container_name: legal-ai-mongo
restart: unless-stopped
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: password123
MONGO_INITDB_DATABASE: legal_ai
volumes:
- mongo_data:/data/db
- ./database/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
networks:
- legal-ai-network
# Backend Flask API
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: legal-ai-backend
restart: unless-stopped
ports:
- "5001:5001"
env_file:
- ./backend/.env
depends_on:
- mongo
- ai-service
volumes:
- ./backend:/app
- ./database:/database
networks:
- legal-ai-network
# AI Microservice
# SPARK AI INTEGRATION NOTE: When switching to Spark AI, update the environment variables
# in ./ai-service/.env file to include SPARK_API_KEY instead of HF_TOKEN
ai-service:
build:
context: ./ai-service
dockerfile: Dockerfile
container_name: legal-ai-service
restart: unless-stopped
ports:
- "8000:8000"
env_file:
- ./ai-service/.env
volumes:
- ./ai-service:/app
- ./ai-service/data:/app/data
networks:
- legal-ai-network
# Frontend Next.js
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: legal-ai-frontend
restart: unless-stopped
ports:
- "3000:3000"
environment:
NEXT_PUBLIC_API_URL: http://localhost:5001
NEXT_PUBLIC_AI_SERVICE_URL: http://localhost:8000
depends_on:
- backend
volumes:
- ./frontend:/app
- /app/node_modules
- /app/.next
networks:
- legal-ai-network
networks:
legal-ai-network:
driver: bridge
volumes:
mongo_data: