Files
workphone-sdk/sdk/docker-compose.yml
Manus AI 0bd2ae2e81
Some checks failed
SDK CI / python-compile (push) Has been cancelled
docs: 完善工作手机安装部署与更新说明
2026-07-12 08:27:19 +08:00

59 lines
2.0 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.

# 工作手机SDK v3.1 - Docker Compose配置
# 使用现有的MongoDB(27017)和Redis(6379)
# 含 AI Brain 支持、Hook 模块管理
# 统一入口8899控制台 /hub、API、WebSocket 同源,不再使用 8880 Nginx 反代)
services:
workphone-sdk:
build:
context: .
dockerfile: Dockerfile
container_name: workphone-sdk
restart: always
ports:
- "8899:8899"
environment:
- ENV=production
- TZ=Asia/Shanghai
# Type-C/USB容器内默认看不到本机 USB。宿主机执行 sdk/scripts/adb_host_server_listen_all.sh 后,
# 在 .env 中设置 ADB_SERVER_SOCKET=tcp:host.docker.internal:50385037 在部分 Mac 会挂死)
- ADB_SERVER_SOCKET=${ADB_SERVER_SOCKET:-tcp:host.docker.internal:5038}
- MONGO_URI=mongodb://admin:admin123@host.docker.internal:27017
- MONGO_DB=workphone_sdk
- REDIS_URL=redis://host.docker.internal:6379/1
- DEEPSEEK_API_KEY=${DEEPSEEK_API_KEY:-}
- API_KEY=${API_KEY:-workphone-secret-key}
# AI Brain 配置
- AI_BRAIN_ENABLED=${AI_BRAIN_ENABLED:-true}
- AI_BRAIN_API_URL=${AI_BRAIN_API_URL:-http://host.docker.internal:3102}
- AI_BRAIN_API_KEY=${AI_BRAIN_API_KEY:-kr_jSH3zQPDUKmuNwn_Q931CJgfofuOs5Eg}
- AI_BRAIN_DEFAULT_MODEL=${AI_BRAIN_DEFAULT_MODEL:-claude-sonnet-4-5-20250929}
volumes:
- ./app:/app
- ./frida_scripts:/app/frida_scripts
- ../开发文档:/开发文档:ro
- workphone_data:/data
- workphone_logs:/app/logs
# 与宿主机共用 adb 密钥容器内通过「WiFi + adb tcpip」连手机Mac 上 Docker 无法直插 USB
- ${HOME}/.android:/root/.android:ro
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8899/health"]
interval: 30s
timeout: 10s
retries: 3
logging:
driver: json-file
options:
max-size: "50m"
max-file: "3"
volumes:
workphone_data:
workphone_logs:
networks:
default:
name: workphone-network