-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
112 lines (102 loc) · 2.65 KB
/
Copy pathdocker-compose.yml
File metadata and controls
112 lines (102 loc) · 2.65 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
version: '3.8'
services:
spectra:
build:
context: .
dockerfile: Dockerfile
container_name: spectra-worker
environment:
SPECTRA_DEBUG: "false"
SPECTRA_LOG_LEVEL: "INFO"
SPECTRA_DB_PATH: "/app/data/spectra.db"
SPECTRA_MEDIA_DIR: "/app/media"
SPECTRA_LOG_DIR: "/app/logs"
SPECTRA_CHECKPOINT_DIR: "/app/checkpoints"
QDRANT_URL: "http://qdrant:6333"
REDIS_URL: "redis://redis:6379"
volumes:
- spectra-data:/app/data
- spectra-media:/app/media
- spectra-logs:/app/logs
- spectra-checkpoints:/app/checkpoints
- spectra-config:/app/config
restart: unless-stopped
deploy:
resources:
limits:
cpus: '2'
memory: 2G
reservations:
cpus: '1'
memory: 1G
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- spectra-network
depends_on:
- qdrant
- redis
# Qdrant Vector Database for Semantic Search
qdrant:
image: qdrant/qdrant:latest
container_name: spectra-qdrant
ports:
- "6333:6333" # REST API
- "6334:6334" # gRPC API
volumes:
- spectra-qdrant:/qdrant/storage
environment:
QDRANT_API_KEY: "${QDRANT_API_KEY:-optional-api-key-change-in-production}"
networks:
- spectra-network
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:6333/healthz || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Redis — optional search-result caching layer
# Caches hybrid search results, KEYSTONE anchor tables, and message metadata.
# If absent, CacheManager silently no-ops and search hits the DB directly.
#
# QIHSE KV alternative: QIHSE's built-in RESP2/RESP3 KV store is wire-compatible
# with Redis and can replace this container entirely. To use it, comment out
# this service and run the QIHSE RESP server (see docs/CONFIGURATION.md).
redis:
image: redis:7-alpine
container_name: spectra-redis
ports:
- "6379:6379"
volumes:
- spectra-redis:/data
networks:
- spectra-network
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
volumes:
spectra-data:
driver: local
spectra-media:
driver: local
spectra-logs:
driver: local
spectra-checkpoints:
driver: local
spectra-config:
driver: local
spectra-qdrant:
driver: local
spectra-redis:
driver: local
networks:
spectra-network:
driver: bridge