-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
49 lines (48 loc) · 2.38 KB
/
Copy pathdocker-compose.yml
File metadata and controls
49 lines (48 loc) · 2.38 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
# All-in-one SuperBrowser agent server.
#
# cp deploy/.env.example deploy/.env # set LLM_MODEL + OPENAI_API_KEY (or ANTHROPIC_API_KEY)
# docker compose up -d # ready when :8450/api/v1/health is healthy
#
# Then from Python on the host (NO RunAgent key needed):
# from runagent_superbrowser import SuperBrowser
# sb = SuperBrowser(remote=False, local_agent_url="http://localhost:8450")
# print(sb.run("what's the top story on Hacker News?").text)
services:
superbrowser:
build: .
image: runagent-superbrowser:all-in-one
ports:
- "8450:8450" # the agent server — the only port clients use
- "127.0.0.1:3100:3100" # live browser viewer (TS engine) — host-only
- "127.0.0.1:3101:3101" # T3 (patchright) viewer — host-only, tier-3 runs
env_file:
- deploy/.env # LLM_MODEL + OPENAI_API_KEY / ANTHROPIC_API_KEY (+ optional features)
environment:
- SUPERBROWSER_URL=http://127.0.0.1:3100
- PORT=3100
- HEADLESS=true
# NOTE: the container never needs a RunAgent (rau_) key. That key matters
# only for the host SDK when remote=True (which bypasses this container).
volumes:
- sb-superbrowser:/home/app/.superbrowser # per-user cookies / profiles
- sb-nanobot:/home/app/.nanobot # orchestrator state
- ./downloads:/tmp/superbrowser/downloads # downloaded files land on the host
cap_add:
- SYS_ADMIN # Chromium's namespace sandbox (or use a seccomp profile)
shm_size: 2gb # Chrome renderer shared memory. Default /dev/shm is 64MB;
# T3 patchright launches (unlike T1) do NOT pass
# --disable-dev-shm-usage, so a heavy DOM under headful
# Chrome can exhaust 64MB → renderer crash → the in-memory
# TS session Map is wiped on the restart:unless-stopped
# cycle → mid-task 404. Host /dev/shm is ~half of RAM, so
# this is a PARITY fix as much as hardening.
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:8450/api/v1/health"]
interval: 15s
timeout: 5s
retries: 5
start_period: 90s # cold start: engine boot + chromium warmup + register
restart: unless-stopped
volumes:
sb-superbrowser:
sb-nanobot: