-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
32 lines (32 loc) · 1.14 KB
/
Copy pathdocker-compose.yml
File metadata and controls
32 lines (32 loc) · 1.14 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
services:
linear-rag:
build:
context: .
dockerfile: Dockerfile
image: linear-rag:latest
container_name: linear-rag
# 对应 --network host
# 注意:使用 host 模式后,ports 映射会被忽略,容器直接使用 12125 端口
# network_mode: "host"
# 对应 --restart always
restart: always
shm_size: "1gb"
# 让容器可以通过 host.docker.internal 访问宿主机上的 ES 或模型服务。
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- 12125:12125
# 模型、Embedding、对象存储和 ES 配置统一读取项目根目录 .env。
env_file:
- .env
# 仅覆盖容器内路径和运行参数,避免把宿主机的 localhost 配置带入容器。
environment:
- TZ=Asia/Shanghai
- PYTHONUNBUFFERED=1
- SPACY_N_PROCESS=1
- LOCAL_STORAGE_ROOT=/app/.data/object-storage
# 若 ES 运行在宿主机,请把 .env 的 es_url 改为
# http://host.docker.internal:9200;远程服务则直接填写远程地址。
volumes:
- ./.data/object-storage:/app/.data/object-storage
command: ["python", "main.py"]