From d199b10ba483af7b0e214b7514ea9608a5a61746 Mon Sep 17 00:00:00 2001 From: ginnoir Date: Sat, 27 Jun 2026 15:00:43 -0500 Subject: [PATCH] =?UTF-8?q?feat(camofox):=20stack=20files=20(PARKED=20?= =?UTF-8?q?=E2=80=94=20not=20deployed,=20upstream=20browser=20bug)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Image camofox-browser:135.0.1-x86_64 builds + serves, but camoufox fails to launch: "cannot open display: [object Promise]" (upstream un-awaited Promise in the virtual_display path). HTTP /health ok, browserRunning:false. NOT deployed: no Caddy route, no Portainer registration, no Hermes wiring. Resume once the upstream display bug is fixed (re-add Caddy block + register stack). Co-Authored-By: Claude Opus 4.8 --- stacks/camofox/docker-compose.yml | 41 +++++++++++++++++++++++++++++++ stacks/camofox/stack.env | 13 ++++++++++ 2 files changed, 54 insertions(+) create mode 100644 stacks/camofox/docker-compose.yml create mode 100644 stacks/camofox/stack.env diff --git a/stacks/camofox/docker-compose.yml b/stacks/camofox/docker-compose.yml new file mode 100644 index 0000000..f06410f --- /dev/null +++ b/stacks/camofox/docker-compose.yml @@ -0,0 +1,41 @@ +# camofox stack — self-hosted stealth headless browser (Camoufox/Firefox) REST API for the +# Hermes agent. Chosen over the native Playwright/Browserbase plugins for self-hosted, +# no-cloud-key, anti-detection browsing on valhalla. +# +# No published image: built on-host as camofox-browser:135.0.1-x86_64 via `make build` in the +# upstream clone (/storage1/hermes/workspace/clones/camofox-browser). pull_policy: never so +# Portainer's git redeploy uses the local image instead of trying to pull a non-existent +# registry tag. To make it survive a host rebuild, push to registry.ginnoir.com later (famapp +# pattern) and swap the image ref. +# +# Internal-only: published on the edge host-IP (172.20.0.1:9377) so host-side Hermes can reach +# it directly, and joined to `edge` so Caddy reaches it by container name. Bearer-auth enforced +# by camofox itself (CAMOFOX_ACCESS_KEY). Image pinned out of Watchtower. +services: + camofox: + image: camofox-browser:135.0.1-x86_64 + pull_policy: never + container_name: camofox + restart: unless-stopped + labels: + - "com.centurylabs.watchtower.enable=false" + env_file: + - stack.env + networks: [edge] + # Firefox-based browsers can crash with the default 64MB /dev/shm. + shm_size: "1gb" + volumes: + - /config/camofox/cookies:/data/cookies + - /config/camofox/profiles:/data/profiles + ports: + - "172.20.0.1:9377:9377" + healthcheck: + test: ["CMD", "curl", "-fsS", "http://localhost:9377/health"] + interval: 30s + timeout: 10s + retries: 5 + start_period: 40s + +networks: + edge: + external: true diff --git a/stacks/camofox/stack.env b/stacks/camofox/stack.env new file mode 100644 index 0000000..9b02d68 --- /dev/null +++ b/stacks/camofox/stack.env @@ -0,0 +1,13 @@ +# camofox stack env — committed intentionally (homelab convention; secrets versioned in the +# private repo). LF line endings (enforced by .gitattributes). +# +# CAMOFOX_ACCESS_KEY — bearer required on all routes except /health, cookie-import, /stop. +# CAMOFOX_ADMIN_KEY — required for POST /stop. +# CAMOFOX_API_KEY — left UNSET on purpose: keeps the cookie-import endpoint disabled. +# CAMOFOX_COOKIES_DIR / CAMOFOX_PROFILE_DIR — explicit container paths (avoid home-dir ambiguity); +# mapped to /config/camofox/* binds on the host. +CAMOFOX_ACCESS_KEY=cc9dac55139c97431160468bcfa43bbe0ab862710990f762d04e5881da9574b3 +CAMOFOX_ADMIN_KEY=117606acac488bf9661dab6ed276bc2cb465799eaf5676f2f7576b57e44b0ef4 +CAMOFOX_PORT=9377 +CAMOFOX_COOKIES_DIR=/data/cookies +CAMOFOX_PROFILE_DIR=/data/profiles