forked from DreamLab-AI/VisionClaw
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
170 lines (161 loc) · 6.34 KB
/
Copy pathdocker-compose.yml
File metadata and controls
170 lines (161 loc) · 6.34 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# AUTO-GENERATED from agentbox.toml via flake.nix — do not edit by hand.
# Run: nix build .#compose
services:
# R-025: optional `claude-zai` sidecar. management-api/utils/process-manager.js
# dials http://claude-zai-service:9600 when the Z.AI/GLM provider is selected.
# No service is emitted here by default — the sidecar is operator-provided and
# joins visionclaw_network as `claude-zai-service`. process-manager guards the
# URL so its absence is a no-op when Z.AI is not in use (handled separately).
ruvector-postgres:
image: ruvnet/ruvector-postgres:2.0.5@sha256:7fb09d439d82fccbe6e0035d09f91c9dce456bb2d70cb2e8d6afb12a6afa2051
container_name: ruvector-postgres
restart: unless-stopped
environment:
- POSTGRES_DB=ruvector
- POSTGRES_USER=ruvector
- POSTGRES_PASSWORD=${RUVECTOR_PG_PASSWORD:?set RUVECTOR_PG_PASSWORD}
volumes:
- ruvector-pg-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ruvector -d ruvector"]
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
networks:
- default
- visionclaw
agentbox:
image: ${AGENTBOX_IMAGE_REF:-agentbox:runtime-x86_64-linux}
container_name: agentbox
hostname: agentbox
restart: unless-stopped
depends_on:
ruvector-postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9090/ready"]
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
# R-003: host exposure is loopback-only (SSH-tunnel model) — reached via
# tunnel; sibling-container access on the docker network is gated by
# per-service auth, not by host port binding.
ports:
- "127.0.0.1:9090:9090"
- "127.0.0.1:9700:9700"
- "127.0.0.1:9091:9091"
- "127.0.0.1:8484:8484"
- "127.0.0.1:8888:8888"
- "127.0.0.1:5901:5901"
- "127.0.0.1:8080:8080"
environment:
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
- GITHUB_TOKEN=${GITHUB_TOKEN:-}
- OPENAI_API_KEY=${OPENAI_API_KEY:-ollama}
- OPENAI_BASE_URL=${OPENAI_BASE_URL:-http://ollama:11434/v1}
- OLLAMA_BASE_URL=${OLLAMA_BASE_URL:-http://ollama:11434}
- OLLAMA_MODEL=${OLLAMA_MODEL:-qwen2.5:32b-instruct}
- GOOGLE_GEMINI_API_KEY=${GOOGLE_GEMINI_API_KEY:-}
- GEMINI_API_KEY=${GEMINI_API_KEY:-}
- MANAGEMENT_API_KEY=${MANAGEMENT_API_KEY:-}
- MANAGEMENT_API_AUTH_MODE=${MANAGEMENT_API_AUTH_MODE:-hybrid}
# Shared service key for VisionClaw mutating endpoints (broker write-back);
# must match VISIONCLAW_AGENT_KEY on the VisionClaw container.
- VISIONCLAW_AGENT_KEY=${VISIONCLAW_AGENT_KEY:-}
- NOSTR_RELAYS=${NOSTR_RELAYS:-wss://relay.damus.io,wss://relay.primal.net}
- AGENTBOX_AGENT_ID=${AGENTBOX_AGENT_ID:-agentbox-core}
- AGENTBOX_METRICS_PORT=9091
- AGENTBOX_OTLP_ENDPOINT=
- AGENTBOX_LOG_LEVEL=info
- XINFERENCE_ENDPOINT=${XINFERENCE_ENDPOINT:-http://xinference:9997}
- EMBEDDING_MODEL=${EMBEDDING_MODEL:-bge-small-en-v1.5}
# Baseline: supervisord runs as PID 1 root, with per-program `user=devuser`
# drops on every long-running service. Root is required at boot for
# tmpfs subdir creation, cert generation, and chowning runtime dirs to
# uid 1000. R-005/SEC-001: no runtime sudo — root-at-boot via supervisord
# (PID 1) is the only elevation.
# SETUID/SETGID are REQUIRED: supervisord calls setgroups()/setuid() to
# demote children to devuser, and that needs CAP_SETGID/CAP_SETUID even
# for privilege *dropping*. no-new-privileges:true neuters setuid file
# bits at execve (privilege *gaining*) but does not replace these caps.
# Per ADR-007 §4a hardening posture; see PRD-003 §5.4 and ADR-027 §amendment.
read_only: true
cap_drop:
- ALL
cap_add:
- CHOWN
- FOWNER
- DAC_OVERRIDE
- AUDIT_WRITE
- KILL
- NET_ADMIN
- SETUID
- SETGID
tmpfs:
- /tmp:mode=1777,size=256M
- /run:mode=755,size=64M,uid=1000,gid=1000
- /var/run:mode=755,size=16M,uid=1000,gid=1000
- /var/log:mode=755,size=128M,uid=1000,gid=1000
- /var/log/supervisor:mode=755,size=64M,uid=1000,gid=1000
- /var/lib/https-bridge:mode=755,size=8M,uid=1000,gid=1000
- /home/devuser/.cache:mode=755,size=256M,uid=1000,gid=1000
- /home/devuser/.local:mode=755,size=128M,uid=1000,gid=1000
- /home/devuser/.config:mode=755,size=64M,uid=1000,gid=1000
- /home/devuser/.claude-flow:mode=755,size=64M,uid=1000,gid=1000
- /home/devuser/.codex:mode=755,size=512M,uid=1000,gid=1000
- /home/devuser/.antigravity:mode=755,size=256M,uid=1000,gid=1000
- /var/cache:mode=755,size=512M,uid=1000,gid=1000
- /usr/local/bin:mode=755,size=8M,exec,suid
- /app/mcp-logs:mode=755,size=100M,uid=1000,gid=1000
- /tmp/.X11-unix:mode=1777
- /run/user/1000:mode=700,uid=1000,gid=1000
security_opt:
- no-new-privileges:true
- seccomp=./config/seccomp-agentbox.json
volumes:
- ./agentbox.toml:/etc/agentbox.toml:ro
- ./workspace:/home/devuser/workspace
- ./projects:/projects
- ruvector-data:/var/lib/ruvector
- solid-data:/var/lib/solid
- sovereign-identities:/var/lib/agentbox/identities
- agentbox-secrets:/var/lib/agentbox/secrets
- code-harness-data:/var/lib/agentbox/code-harness
- agentbox-events:/var/lib/agentbox/events
- codeserver-config:/home/devuser/.local/share/code-server
- consultations-data:/var/lib/agentbox/consultations
- nostr-relay-data:/var/lib/nostr-relay
- tailscale-state:/var/lib/tailscale
networks:
- default
- visionclaw
volumes:
ruvector-pg-data:
name: ruvector_postgres_data_v2
ruvector-data:
name: agentbox-ruvector-data
solid-data:
name: agentbox-solid-data
sovereign-identities:
name: agentbox-sovereign-identities
agentbox-secrets:
name: agentbox-secrets
code-harness-data:
name: agentbox-code-harness-data
agentbox-events:
name: agentbox-events
codeserver-config:
name: agentbox-codeserver-config
consultations-data:
name: agentbox-consultations-data
nostr-relay-data:
name: agentbox-nostr-relay-data
tailscale-state:
name: agentbox-tailscale-state
networks:
default:
visionclaw:
name: visionclaw_network
external: true