-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
75 lines (69 loc) · 2.6 KB
/
docker-compose.yml
File metadata and controls
75 lines (69 loc) · 2.6 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
version: "3.8"
# RAG Tax Advisor — Observability + Search Stack
#
# Services:
# elasticsearch — hybrid search (kNN + BM25 + RRF) for production retrieval
# prometheus — scrapes FastAPI /metrics every 15s
# grafana — dashboard at http://localhost:3000 (admin/admin)
#
# Usage:
# docker-compose up -d
# # then run the FastAPI server:
# uvicorn server:app --reload --port 8000
# # index chunks into ES:
# python elastic_retriever.py --setup
services:
# ─── ElasticSearch ────────────────────────────────────────────
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.13.0
container_name: rag_elasticsearch
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- xpack.security.http.ssl.enabled=false
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ports:
- "9200:9200"
- "9300:9300"
volumes:
- es_data:/usr/share/elasticsearch/data
healthcheck:
test: ["CMD-SHELL", "curl -s http://localhost:9200/_cluster/health | grep -q '\"status\":\"green\\|yellow\"'"]
interval: 20s
timeout: 10s
retries: 5
# ─── Prometheus ───────────────────────────────────────────────
prometheus:
image: prom/prometheus:latest
container_name: rag_prometheus
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
ports:
- "9090:9090"
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--web.enable-lifecycle"
depends_on:
- elasticsearch
# ─── Grafana ──────────────────────────────────────────────────
grafana:
image: grafana/grafana:10.4.0
container_name: rag_grafana
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
- GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/etc/grafana/provisioning/dashboards/rag_tax_advisor.json
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasources:ro
- ./grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards:ro
- ./grafana/dashboards:/etc/grafana/provisioning/dashboards:ro
depends_on:
- prometheus
volumes:
es_data:
grafana_data: