Files
workphone-sdk/sdk/docker-compose.yml
卡若 9118df9eee
Some checks failed
SDK CI / python-compile (push) Has been cancelled
feat: sdk agent、Android 与文档同步至 Gitea
- 新增 sdk/app/agent(Hook/Skills/Anti-ban 等)及 NAS/ADB 脚本
- 更新 Android 端、unified、PHP SDK、Docker Compose
- Soul 文档迁移至 Soul调研/;移除资料目录内 APK
- .gitignore 排除 sdk/tmp、sdk/logs、sdk/tmp_rom

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-06 18:20:14 +08:00

73 lines
2.2 KiB
YAML
Raw 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 模块管理
services:
workphone-sdk:
build:
context: .
dockerfile: Dockerfile
container_name: workphone-sdk
restart: always
ports:
- "8899:8899"
environment:
- ENV=production
# Type-C/USB容器内默认看不到本机 USB。宿主机执行 sdk/scripts/adb_host_server_listen_all.sh 后,
# 在 .env 中设置 ADB_SERVER_SOCKET=tcp:host.docker.internal:5037或取消下行注释即可与宿主机共用同一设备列表。
- ADB_SERVER_SOCKET=${ADB_SERVER_SOCKET:-tcp:host.docker.internal:5037}
- 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:-}
- AI_BRAIN_DEFAULT_MODEL=${AI_BRAIN_DEFAULT_MODEL:-auto}
volumes:
- ./app:/app
- ./frida_scripts:/app/frida_scripts
- 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"
# 统一 Web 入口:反代至 workphone-sdk静态页 / API / WebSocket 同源)
website:
build:
context: ./website
dockerfile: Dockerfile
container_name: workphone-website
restart: always
ports:
- "8880:80"
depends_on:
- workphone-sdk
logging:
driver: json-file
options:
max-size: "20m"
max-file: "2"
volumes:
workphone_data:
workphone_logs:
networks:
default:
name: workphone-network