forked from chatfire-AI/huobao-drama
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
40 lines (38 loc) · 1.19 KB
/
docker-compose.yml
File metadata and controls
40 lines (38 loc) · 1.19 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
services:
huobao-drama:
image: huobao-drama:latest
container_name: huobao-drama
build:
context: .
dockerfile: Dockerfile
ports:
- "5678:5678"
volumes:
# 持久化数据目录(使用命名卷,容器内以 root 运行)
- huobao-data:/app/data
# 挂载配置文件(可选,如需自定义配置请取消注释)
# - ./configs/config.yaml:/app/configs/config.yaml:ro
# 注意:如果使用本地目录挂载,需要确保目录权限正确
# 例如:- ./data:/app/data (需要 chmod 777 ./data)
environment:
- TZ=Asia/Shanghai
# 访问宿主机服务说明:
# 使用 host.docker.internal 代替 127.0.0.1
# 例如:http://host.docker.internal:11434 (Ollama)
extra_hosts:
- "host.docker.internal:host-gateway" # 统一支持所有平台
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:5678/health"]
interval: 30s
timeout: 3s
retries: 3
start_period: 10s
networks:
- huobao-network
volumes:
huobao-data:
driver: local
networks:
huobao-network:
driver: bridge