-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
195 lines (181 loc) · 4.44 KB
/
docker-compose.yml
File metadata and controls
195 lines (181 loc) · 4.44 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
version: '3.8'
services:
# PostgreSQL Database
postgres:
image: postgres:15-alpine
container_name: evy-postgres
environment:
POSTGRES_USER: evy
POSTGRES_PASSWORD: evy_password
POSTGRES_DB: evy_db
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U evy"]
interval: 10s
timeout: 5s
retries: 5
# Prometheus for monitoring
prometheus:
image: prom/prometheus:latest
container_name: evy-prometheus
ports:
- "9090:9090"
volumes:
- ./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
depends_on:
- api-gateway
# Grafana for visualization
grafana:
image: grafana/grafana:latest
container_name: evy-grafana
ports:
- "3001:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_SERVER_ROOT_URL=http://localhost:3001
volumes:
- grafana_data:/var/lib/grafana
- ./monitoring/grafana/dashboards:/etc/grafana/provisioning/dashboards
depends_on:
- prometheus
# SMS Gateway Service
sms-gateway:
build:
context: .
dockerfile: Dockerfile
container_name: evy-sms-gateway
command: python -m backend.services.sms_gateway.main
ports:
- "8001:8001"
environment:
- SMS_GATEWAY_PORT=8001
- MESSAGE_ROUTER_PORT=8002
volumes:
- ./backend:/app/backend
depends_on:
- postgres
# Message Router Service
message-router:
build:
context: .
dockerfile: Dockerfile
container_name: evy-message-router
command: python -m backend.services.message_router.main
ports:
- "8002:8002"
environment:
- MESSAGE_ROUTER_PORT=8002
- LLM_INFERENCE_PORT=8003
- RAG_SERVICE_PORT=8004
- SMS_GATEWAY_PORT=8001
volumes:
- ./backend:/app/backend
depends_on:
- sms-gateway
# LLM Inference Service
llm-inference:
build:
context: .
dockerfile: Dockerfile
container_name: evy-llm-inference
command: python -m backend.services.llm_inference.main
ports:
- "8003:8003"
environment:
- LLM_INFERENCE_PORT=8003
- LLM_PROVIDER=${LLM_PROVIDER:-openai}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- DEFAULT_MODEL=${DEFAULT_MODEL:-gpt-4}
volumes:
- ./backend:/app/backend
depends_on:
- postgres
# RAG Service
rag-service:
build:
context: .
dockerfile: Dockerfile
container_name: evy-rag-service
command: python -m backend.services.rag_service.main
ports:
- "8004:8004"
environment:
- RAG_SERVICE_PORT=8004
- CHROMA_PERSIST_DIR=/data/chroma
- OPENAI_API_KEY=${OPENAI_API_KEY}
volumes:
- ./backend:/app/backend
- chroma_data:/data/chroma
depends_on:
- postgres
# Privacy Filter Service
privacy-filter:
build:
context: .
dockerfile: Dockerfile
container_name: evy-privacy-filter
command: python -m backend.services.privacy_filter.main
ports:
- "8005:8005"
environment:
- PRIVACY_FILTER_PORT=8005
- MAX_SMS_PER_MINUTE=${MAX_SMS_PER_MINUTE:-10}
- MAX_SMS_PER_HOUR=${MAX_SMS_PER_HOUR:-100}
volumes:
- ./backend:/app/backend
depends_on:
- postgres
# API Gateway
api-gateway:
build:
context: .
dockerfile: Dockerfile
container_name: evy-api-gateway
command: python -m backend.api_gateway.main
ports:
- "8000:8000"
environment:
- API_GATEWAY_PORT=8000
- SMS_GATEWAY_PORT=8001
- MESSAGE_ROUTER_PORT=8002
- LLM_INFERENCE_PORT=8003
- RAG_SERVICE_PORT=8004
- PRIVACY_FILTER_PORT=8005
volumes:
- ./backend:/app/backend
depends_on:
- sms-gateway
- message-router
- llm-inference
- rag-service
- privacy-filter
# Frontend Dashboard
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: evy-frontend
ports:
- "3000:3000"
environment:
- REACT_APP_API_URL=http://localhost:8000
- REACT_APP_WS_URL=ws://localhost:8000
volumes:
- ./frontend/src:/app/src
depends_on:
- api-gateway
volumes:
postgres_data:
prometheus_data:
grafana_data:
chroma_data:
networks:
default:
name: evy-network