Files
QMDSearch/docker-compose.yml
T
kplam 2ab8b56a01 feat: 完成全量功能开发,包括前端管理后台与后端服务优化
此提交实现了完整的知识库管理系统:
1. 新增Vue3 + Antd Vue前端管理后台,包含登录、文档管理、检索、类目设置等完整页面
2. 重构后端LLM调用抽象层,支持Ollama与OpenAI兼容服务动态切换
3. 调整默认嵌入模型配置为本地bge-m3模式
4. 优化入库任务去重逻辑与缓存清理机制
5. 完善Docker镜像构建与docker-compose部署配置
6. 修复多项测试用例与兼容性问题
7. 新增运行时配置API,支持动态调整系统参数
2026-07-31 12:05:25 +08:00

96 lines
2.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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
# 针对 16 线程 / 61GB 内存的 NAS 调优:放宽入库并发
- INGEST_MAX_CONCURRENCY=${INGEST_MAX_CONCURRENCY:-4}
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
- ${NAS_DATA_DIR:-./data}/uploads:/app/uploads
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
environment:
# 针对 Ryzen 9 7940HS16 线程)的 CPU 推理调优:
# 并行推理任务数、常驻模型数、单请求线程上限、KV 缓存量化以省内存
- OLLAMA_NUM_PARALLEL=4
- OLLAMA_MAX_LOADED_MODELS=2
- OLLAMA_NUM_THREADS=16
- OLLAMA_KV_CACHE_TYPE=q8_0
# 首次启动自动拉取所需模型(qwen2.5:1.5b 总结 + bge-m3 嵌入),
# 下载完成后转交常驻 ollama serve。已存在时仅做健康检查。
entrypoint: /bin/bash
command:
- -c
- |
ollama serve &
SERVE_PID=$$!
sleep 6
ollama pull qwen2.5:1.5b
ollama pull bge-m3
wait $$SERVE_PID
networks:
- qmdsearch
networks:
qmdsearch:
driver: bridge