-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
93 lines (87 loc) · 2.24 KB
/
docker-compose.yml
File metadata and controls
93 lines (87 loc) · 2.24 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
version: '3.8'
services:
# PostgreSQL Database
postgres:
image: postgres:15-alpine
container_name: nlp-orders-db
environment:
POSTGRES_DB: orders
POSTGRES_USER: orderuser
POSTGRES_PASSWORD: orderpass123
POSTGRES_INITDB_ARGS: "--encoding=UTF8"
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./backend/schema.sql:/docker-entrypoint-initdb.d/01-schema.sql
- ./scripts/seed_data.sql:/docker-entrypoint-initdb.d/02-seed.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U orderuser -d orders"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
# MCP Tools Service
mcp-tools:
build:
context: ./mcp-tools
dockerfile: Dockerfile
container_name: nlp-orders-mcp
environment:
- DATABASE_URL=postgresql://orderuser:orderpass123@postgres:5432/orders
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
# FastAPI Backend
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: nlp-orders-api
environment:
- DATABASE_URL=postgresql://orderuser:orderpass123@postgres:5432/orders
- MCP_TOOLS_URL=http://mcp-tools:8080
- TELEGRAM_TOKEN=${TELEGRAM_TOKEN}
- GEMINI_API_KEY=${GEMINI_API_KEY}
- NGROK_URL=${NGROK_URL}
- PORT=8000
ports:
- "8000:8000"
depends_on:
postgres:
condition: service_healthy
mcp-tools:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
# Admin Dashboard
admin-dashboard:
build:
context: ./admin-dashboard
dockerfile: Dockerfile
container_name: nlp-orders-admin
environment:
- NEXT_PUBLIC_API_URL=http://localhost:8000
ports:
- "3000:3000"
depends_on:
- backend
restart: unless-stopped
volumes:
postgres_data:
driver: local
networks:
default:
driver: bridge