-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
90 lines (84 loc) · 2.03 KB
/
Copy pathdocker-compose.yml
File metadata and controls
90 lines (84 loc) · 2.03 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
# =============================================================================
# Docker Compose — Local Development
# Spins up all services locally for development and testing
# =============================================================================
services:
# --- FastAPI Backend ---
backend:
build:
context: .
dockerfile: Dockerfile
ports:
- "8000:8000"
env_file:
- .env
environment:
- REDIS_HOST=redis
- NEO4J_URI=bolt://neo4j:7687
- APP_ENV=development
volumes:
- ./app:/app/app # Hot reload
depends_on:
redis:
condition: service_healthy
neo4j:
condition: service_healthy
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
networks:
- rag-network
# --- Streamlit Frontend ---
frontend:
build:
context: .
dockerfile: Dockerfile.streamlit
ports:
- "8501:8501"
env_file:
- .env
environment:
- API_BASE_URL=http://backend:8000
volumes:
- ./frontend:/app/frontend # Hot reload
depends_on:
- backend
networks:
- rag-network
# --- Redis (local substitute for Memorystore) ---
redis:
image: redis/redis-stack:latest
ports:
- "6379:6379"
- "8001:8001" # RedisInsight UI
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- rag-network
# --- Neo4j (local substitute for AuraDB) ---
neo4j:
image: neo4j:5-community
ports:
- "7474:7474" # HTTP (browser)
- "7687:7687" # Bolt
environment:
- NEO4J_AUTH=neo4j/password
- NEO4J_PLUGINS=["apoc"]
volumes:
- neo4j-data:/data
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:7474 || exit 1"]
interval: 10s
timeout: 5s
retries: 10
networks:
- rag-network
volumes:
redis-data:
neo4j-data:
networks:
rag-network:
driver: bridge