Repository navigation
Expand file tree
/
Copy pathcompose.yaml
More file actions
115 lines (113 loc) · 4.56 KB
/
Copy pathcompose.yaml
File metadata and controls
115 lines (113 loc) · 4.56 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
services:
claude-desktop:
build:
context: .
dockerfile: Dockerfile
args:
CLAUDE_DESKTOP_VERSION: "${CLAUDE_DESKTOP_VERSION:-1.28929.0}"
image: local/claude-desktop-nas:official-linux
container_name: claude-desktop
hostname: claude-desktop
ports:
- "${COWORK_WEB_PORT:-15821}:8080"
extra_hosts:
- "fn-i3h510-1.tail0292a9.ts.net:100.102.63.126"
env_file:
- .env
environment:
TZ: "${TZ:-Asia/Shanghai}"
USER_ID: "${PUID:-1000}"
GROUP_ID: "${PGID:-1001}"
SUP_GROUP_IDS: "${KVM_GID:-104}"
DISPLAY_WIDTH: "${DISPLAY_WIDTH:-1280}"
DISPLAY_HEIGHT: "${DISPLAY_HEIGHT:-720}"
WEB_AUDIO: "0"
SECURE_CONNECTION: "0"
WEB_AUTHENTICATION: "0"
VNC_LOCALHOST_ONLY: "1"
KEEP_APP_RUNNING: "1"
CLAUDE_HEADLESS: "${CLAUDE_HEADLESS:-1}"
CLAUDE_DISABLE_GPU: "${CLAUDE_DISABLE_GPU:-1}"
CLAUDE_COWORK_VM_MEMORY_GB: "${CLAUDE_COWORK_VM_MEMORY_GB:-2}"
CLAUDE_COWORK_VM_CPU_COUNT: "${CLAUDE_COWORK_VM_CPU_COUNT:-1}"
CLAUDE_COWORK_VM_IDLE_MINUTES: "${CLAUDE_COWORK_VM_IDLE_MINUTES:-30}"
CLAUDE_COWORK_VM_SCHEDULE_GUARD_MINUTES: "${CLAUDE_COWORK_VM_SCHEDULE_GUARD_MINUTES:-10}"
CLAUDE_LOCAL_AGENT_MAX_RUNTIME_MINUTES: "${CLAUDE_LOCAL_AGENT_MAX_RUNTIME_MINUTES:-30}"
CLAUDE_COWORK_HOST_BASH: "${CLAUDE_COWORK_HOST_BASH:-0}"
COWORK_BRIDGE_ENABLED: "${COWORK_BRIDGE_ENABLED:-1}"
COWORK_BRIDGE_INTERNAL_PORT: "${COWORK_BRIDGE_INTERNAL_PORT:-9222}"
CLAUDE_REMOTE_GATEWAY_SETTINGS: "${CLAUDE_REMOTE_GATEWAY_SETTINGS:-0}"
CLAUDE_REMOTE_DEVELOPER_ACTIONS: "${CLAUDE_REMOTE_DEVELOPER_ACTIONS:-0}"
CLAUDE_REMOTE_INFRASTRUCTURE_ACTIONS: "${CLAUDE_REMOTE_INFRASTRUCTURE_ACTIONS:-0}"
CLAUDE_REMOTE_CODE_ACTIONS: "${CLAUDE_REMOTE_CODE_ACTIONS:-0}"
CLAUDE_GATEWAY_BASE_URL: "${CLAUDE_GATEWAY_BASE_URL:?Set CLAUDE_GATEWAY_BASE_URL in .env}"
CLAUDE_GATEWAY_API_KEY: "${CLAUDE_GATEWAY_API_KEY:?Set CLAUDE_GATEWAY_API_KEY in .env}"
CLAUDE_GATEWAY_AUTH_SCHEME: "${CLAUDE_GATEWAY_AUTH_SCHEME:-bearer}"
CLAUDE_INFERENCE_MODELS_JSON: "${CLAUDE_INFERENCE_MODELS_JSON:?Set CLAUDE_INFERENCE_MODELS_JSON in .env}"
volumes:
- /vol2/1000/Docker/ClaudeDesktop/config:/config
- /vol2/1000/Docker/ClaudeDesktop/workspace:/workspace
devices:
- /dev/kvm:/dev/kvm
- /dev/vhost-vsock:/dev/vhost-vsock
group_add:
- "${KVM_GID:-104}"
security_opt:
- "seccomp=./security/claude-desktop.json"
shm_size: "2gb"
mem_limit: "${CLAUDE_DESKTOP_MEMORY_LIMIT:-2500m}"
memswap_limit: "${CLAUDE_DESKTOP_MEMORY_SWAP_LIMIT:-3g}"
networks:
- gateway_net
healthcheck:
test:
- CMD-SHELL
- >-
pgrep -f '/usr/bin/claude-desktop|claude-desktop' >/dev/null
&& curl -fsS --max-time 5 http://127.0.0.1:${COWORK_BRIDGE_INTERNAL_PORT:-9222}/health >/dev/null
interval: 30s
timeout: 8s
retries: 5
start_period: 90s
restart: unless-stopped
cowork-bridge:
build:
context: .
dockerfile: bridge/Dockerfile
image: local/claude-cowork-bridge:latest
container_name: claude-cowork-bridge
network_mode: "service:claude-desktop"
depends_on:
claude-desktop:
condition: service_healthy
restart: true
environment:
BRIDGE_HOST: "0.0.0.0"
BRIDGE_PORT: "8080"
COWORK_INTERNAL_URL: "http://127.0.0.1:${COWORK_BRIDGE_INTERNAL_PORT:-9222}"
CLAUDE_REMOTE_GATEWAY_SETTINGS: "${CLAUDE_REMOTE_GATEWAY_SETTINGS:-0}"
CLAUDE_REMOTE_DEVELOPER_ACTIONS: "${CLAUDE_REMOTE_DEVELOPER_ACTIONS:-0}"
CLAUDE_REMOTE_INFRASTRUCTURE_ACTIONS: "${CLAUDE_REMOTE_INFRASTRUCTURE_ACTIONS:-0}"
CLAUDE_REMOTE_CODE_ACTIONS: "${CLAUDE_REMOTE_CODE_ACTIONS:-0}"
COWORK_REMOTE_WORKSPACE_ROOT: "/workspace"
COWORK_REMOTE_ARTIFACTS_ROOT: "/config/Claude/Artifacts"
COWORK_INTERNAL_FAILURE_EXIT_THRESHOLD: "${COWORK_INTERNAL_FAILURE_EXIT_THRESHOLD:-3}"
CLAUDE_INFERENCE_MODELS_JSON: "${CLAUDE_INFERENCE_MODELS_JSON:?Set CLAUDE_INFERENCE_MODELS_JSON in .env}"
volumes:
- /vol2/1000/Docker/ClaudeDesktop/config:/config:ro
- /vol2/1000/Docker/ClaudeDesktop/workspace:/workspace
mem_limit: "${CLAUDE_COWORK_BRIDGE_MEMORY_LIMIT:-256m}"
healthcheck:
test:
- CMD
- node
- -e
- "fetch('http://127.0.0.1:8080/api/health').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))"
interval: 15s
timeout: 5s
retries: 5
start_period: 30s
restart: unless-stopped
networks:
gateway_net:
external: true