-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathdocker-compose-linux.yaml
More file actions
71 lines (67 loc) · 2.64 KB
/
docker-compose-linux.yaml
File metadata and controls
71 lines (67 loc) · 2.64 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
services:
backend:
container_name: anything-extract-backend
build:
context: ./backend
dockerfile: ../docker/Dockerfile.backend
image: anything-extract-backend:latest
# Linux 使用 host 网络模式:服务直接绑定到宿主机端口
network_mode: "host"
environment:
# Linux host 网络下,Ollama 直接通过 localhost 访问
- OLLAMA_BASE_URL=${OLLAMA_BASE_URL:-http://localhost:11434}
- OLLAMA_MODEL=${OLLAMA_MODEL:-llama3.2:3b}
- OLLAMA_EMBEDDING_MODEL=${OLLAMA_EMBEDDING_MODEL:-nomic-embed-text}
- LANCE_DB_PATH=./storage/lancedb
- DATABASE_URL=sqlite:///./storage/database.db
- STORAGE_PATH=./storage
- API_HOST=0.0.0.0
- API_PORT=8888
- FRONTEND_URL=http://localhost:3001
- INGEST_DEFAULT_MODE=${INGEST_DEFAULT_MODE:-queue}
# QAnything OCR/PDF 服务(host 网络下直接使用 localhost)
- ENABLE_OCR_SERVER=${ENABLE_OCR_SERVER:-false}
- ENABLE_PDF_PARSER_SERVER=${ENABLE_PDF_PARSER_SERVER:-false}
- OCR_SERVER_URL=http://localhost:7001
- PDF_PARSER_SERVER_URL=http://localhost:9009
- PARSER_MODE=${PARSER_MODE:-local}
volumes:
- ./storage:/app/storage
restart: unless-stopped
frontend:
container_name: anything-extract-frontend
build:
context: ./frontend
dockerfile: ../docker/Dockerfile.frontend
args:
# Linux host 网络下,前端容器通过 localhost 访问后端
BACKEND_URL: http://localhost:8888
image: anything-extract-frontend:latest
# Linux 也使用 host 网络模式
network_mode: "host"
restart: unless-stopped
# ---- 可选:QAnything OCR + PDF 模型服务 ----
# 启用方式:docker compose -f docker-compose-linux.yaml --profile models up
# 镜像提供 ML 模型(/root/models),本地 dependent_server/ 提供服务代码
qanything_models:
profiles: ["models", "full"]
container_name: anything-extract-qanything-models
image: xixihahaliu01/qanything-linux:v1.5.1
command: /bin/bash /qanything-models-entrypoint.sh
network_mode: "host"
volumes:
- ./dependent_server/:/workspace/dependent_server/
- ./docker/qanything-models-entrypoint.sh:/qanything-models-entrypoint.sh:ro
restart: unless-stopped
# ---- 可选:Ollama 容器(完全容器化 LLM/Embedding)----
# 启用方式:docker compose -f docker-compose-linux.yaml --profile ollama up
ollama:
profiles: ["ollama", "full"]
container_name: anything-extract-ollama
image: ollama/ollama:latest
network_mode: "host"
volumes:
- ollama_data:/root/.ollama
restart: unless-stopped
volumes:
ollama_data: