-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
76 lines (71 loc) · 1.98 KB
/
Copy pathdocker-compose.yml
File metadata and controls
76 lines (71 loc) · 1.98 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
services:
db:
image: postgres:15-alpine
container_name: fair-insight-db
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: fairinsight
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- postgres_data:/var/lib/postgresql/data
backend:
build: ./backend
container_name: fair-insight-backend
restart: always
ports:
- "3000:3000"
environment:
- DATABASE_URL=postgresql://postgres:postgres@db:5432/fairinsight?schema=public
- NODE_ENV=development
depends_on:
db:
condition: service_healthy
volumes:
- ./backend:/app
- /app/node_modules
# Apply committed migrations and seed before starting
command: >
sh -c "npx prisma migrate deploy &&
npx prisma db seed &&
npm run dev"
frontend:
build: ./frontend
container_name: fair-insight-frontend
restart: always
ports:
- "4000:4000"
environment:
- VITE_API_URL=http://localhost:3000/api
depends_on:
- backend
volumes:
- ./frontend:/app
- /app/node_modules
# --- AI reasoning (RAG + chat pháp lý). Cổng 8000. ---
# DB dùng Supabase cloud (env), KHÔNG phụ thuộc service db trên. Embed + chat LLM
# trỏ ra ngoài (Ollama Mac/máy qua tunnel) — xem AI/backend_reasoning/.env.example.
# Reranker đóng sẵn trong image (CPU). Build lại sau khi điền .env trên server.
ai:
build: ./AI/backend_reasoning
container_name: fair-insight-ai
restart: always
ports:
- "8000:8000"
env_file:
- ./AI/backend_reasoning/.env
# cho phép container gọi Ollama chạy trên HOST (nếu embed/chat cùng máy chạy Docker)
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
postgres_data:
networks:
default:
name: fair-insight-network