Files
2026-07-13 12:35:20 +08:00

65 lines
1.3 KiB
YAML
Raw Permalink 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:
xiaozhi-client:
image: shenjingnan/xiaozhi-client:latest
container_name: xiaozhi-client
restart: unless-stopped
# 端口映射(支持 IPv4 和 IPv6)
ports:
- "9999:9999" # Web UI 端口
- "3000:3000" # 备用端口
# 环境变量
environment:
- NODE_ENV=production
- XIAOZHI_WORKSPACE=/workspaces
- XIAOZHI_CONTAINER=true
- XIAOZHI_CONFIG_DIR=/workspaces
# 挂载卷
volumes:
# 工作目录持久化(推荐使用 ~/xiaozhi-client
- ~/xiaozhi-client:/workspaces
# 健康检查
healthcheck:
test: ["CMD", "xiaozhi", "--version"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
# 网络配置
networks:
- xiaozhi-network
# 资源限制
deploy:
resources:
limits:
memory: 512M
cpus: '0.5'
reservations:
memory: 256M
cpus: '0.25'
# 网络配置(支持 IPv4 和 IPv6)
networks:
xiaozhi-network:
driver: bridge
enable_ipv6: true
ipam:
driver: default
config:
- subnet: 172.20.0.0/24
gateway: 172.20.0.1
- subnet: fd00:abcd::/64
gateway: fd00:abcd::1
# 卷配置
volumes:
xiaozhi-config:
driver: local
xiaozhi-logs:
driver: local