-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
110 lines (104 loc) · 2.39 KB
/
Copy pathdocker-compose.yml
File metadata and controls
110 lines (104 loc) · 2.39 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
version: '3.8'
services:
# Python FastAPI Service
api:
build:
context: .
dockerfile: Dockerfile
target: development
container_name: ragcache-api
ports:
- "8000:8000"
env_file:
- .env
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- QDRANT_HOST=qdrant
- QDRANT_PORT=6333
depends_on:
redis:
condition: service_healthy
qdrant:
condition: service_healthy
networks:
- ragcache-network
volumes:
- ./app:/app/app
- ./tests:/app/tests
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
restart: unless-stopped
# Redis Cache Service
redis:
image: redis:7.2-alpine
container_name: ragcache-redis
ports:
- "6379:6379"
volumes:
- redis-data:/data
networks:
- ragcache-network
command: >
redis-server
--appendonly yes
--appendfsync everysec
--maxmemory 512mb
--maxmemory-policy allkeys-lru
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped
# Qdrant Vector Database
qdrant:
image: qdrant/qdrant:v1.6.1
container_name: ragcache-qdrant
ports:
- "6333:6333" # HTTP API
- "6334:6334" # gRPC API
volumes:
- qdrant-data:/qdrant/storage
networks:
- ragcache-network
environment:
- QDRANT__SERVICE__HTTP_PORT=6333
- QDRANT__SERVICE__GRPC_PORT=6334
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:6333/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
restart: unless-stopped
# Redis Commander (Optional - Development Only)
redis-commander:
image: rediscommander/redis-commander:latest
container_name: ragcache-redis-commander
environment:
- REDIS_HOSTS=local:redis:6379
ports:
- "8081:8081"
networks:
- ragcache-network
depends_on:
- redis
profiles:
- dev
restart: unless-stopped
networks:
ragcache-network:
driver: bridge
name: ragcache-network
volumes:
redis-data:
name: ragcache-redis-data
qdrant-data:
name: ragcache-qdrant-data