Files
QMDSearch/docker-compose.yml
T
kplam 51dc8dc4f6 Initial commit: QMDSearch 分层信息检索服务
- FastAPI + Qdrant + Redis + Ollama 技术栈
- L1→L2→L3→chunk 四层分层检索(dense + sparse RRF 融合)
- 文档三级总结与 2.5 级回退
- query 解析路由与分类
- /admin 管理页面
2026-07-29 21:24:40 +08:00

79 lines
1.9 KiB
YAML

services:
app:
build: .
container_name: qmdsearch-app
restart: unless-stopped
ports:
- "${APP_PORT:-8000}:8000"
environment:
- QDRANT_HOST=qdrant
- QDRANT_PORT=6333
- REDIS_URL=redis://redis:6379/0
- OLLAMA_BASE_URL=http://ollama:11434
env_file:
- .env
depends_on:
qdrant:
condition: service_healthy
redis:
condition: service_healthy
ollama:
condition: service_started
volumes:
- ${NAS_DATA_DIR:-./data}/logs:/app/logs
networks:
- qmdsearch
qdrant:
image: qdrant/qdrant:latest
container_name: qmdsearch-qdrant
restart: unless-stopped
ports:
- "${QDRANT_PORT:-6333}:6333"
- "${QDRANT_DASHBOARD_PORT:-6334}:6334"
volumes:
- ${NAS_DATA_DIR:-./data}/qdrant:/qdrant/storage
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:6333/healthz"]
interval: 10s
timeout: 5s
retries: 5
networks:
- qmdsearch
redis:
image: redis:7-alpine
container_name: qmdsearch-redis
restart: unless-stopped
ports:
- "${REDIS_PORT:-6379}:6379"
volumes:
- ${NAS_DATA_DIR:-./data}/redis:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- qmdsearch
ollama:
image: ollama/ollama:latest
container_name: qmdsearch-ollama
restart: unless-stopped
ports:
- "${OLLAMA_PORT:-11434}:11434"
volumes:
- ${NAS_DATA_DIR:-./data}/ollama:/root/.ollama
# 首次启动后需手动拉取模型:
# docker exec qmdsearch-ollama ollama pull qwen2.5:1.5b
# 或取消下方 entrypoint 注释以自动拉取(需等待下载完成)
# entrypoint: /bin/bash
# command: -c "ollama serve & sleep 5 && ollama pull qwen2.5:1.5b && wait"
networks:
- qmdsearch
networks:
qmdsearch:
driver: bridge