services:
camofox-browser:
image: ghcr.io/redf0x1/camofox-browser:latest
ports:
- "9377:9377"
healthcheck:
# CamoFox browser exposes a simple health endpoint at /health.
# This healthcheck uses curl (more common than wget). If your image lacks curl,
# replace this with an equivalent HTTP/TCP check.
test: ["CMD-SHELL", "curl -sf http://localhost:9377/health || exit 1"]
interval: 10s
timeout: 5s
retries: 3
start_period: 15s
# MCP is a stdio server: it waits on stdin for JSON-RPC messages.
# Don't run it via `docker compose up -d`. Instead, start only the browser with `docker compose up -d`,
# then launch the MCP container on-demand via:
# docker compose run --rm -T camofox-mcp
camofox-mcp:
profiles: ["mcp"]
image: ghcr.io/redf0x1/camofox-mcp:latest
environment:
- CAMOFOX_URL=http://camofox-browser:9377
depends_on:
camofox-browser:
condition: service_healthy
stdin_open: true