# FrankClaw Docker Compose # # Usage: # cp .env.docker.example .env.docker # # Edit .env.docker with your API keys and tokens # docker compose up -d # # All three services start together. The gateway does NOT expose ports # to the host — cloudflared reaches it over the internal Docker network. # For local debugging, uncomment the ports section on the gateway service. services: gateway: build: context: . dockerfile: docker/frankclaw/Dockerfile container_name: frankclaw-gateway depends_on: chromium: condition: service_healthy env_file: - path: .env.docker required: false environment: FRANKCLAW_CONFIG: /config/frankclaw.toml FRANKCLAW_STATE_DIR: /var/lib/frankclaw FRANKCLAW_BROWSER_DEVTOOLS_URL: http://chromium:9222/ FRANKCLAW_BASH_POLICY: deny-all volumes: - ./frankclaw.toml:/config/frankclaw.toml:ro - frankclaw-state:/var/lib/frankclaw # Optional: mount the workspace used by agents. # Match this path in frankclaw.toml: # [agents.agents.default] # workspace = "/workspace" # - ./workspace:/workspace # Uncomment to access the gateway directly from the host: # ports: # - "127.0.0.1:18789:18789" networks: - frankclaw restart: unless-stopped chromium: build: context: . dockerfile: docker/chromium/Dockerfile container_name: frankclaw-chromium shm_size: "1gb" networks: - frankclaw restart: unless-stopped cloudflared: image: cloudflare/cloudflared:latest container_name: frankclaw-cloudflared depends_on: gateway: condition: service_healthy # Locally-managed tunnel: mounts credentials from ~/.cloudflared and # uses a docker-specific config that routes to http://gateway:18789 # (instead of localhost). Copy your credentials JSON to docker/cloudflared/. # # Setup: # cp docker/cloudflared/config.yml.example docker/cloudflared/config.yml # cp ~/.cloudflared/.json docker/cloudflared/credentials.json # cp ~/.cloudflared/cert.pem docker/cloudflared/cert.pem # # Edit config.yml with your hostname command: tunnel --no-autoupdate --origincert /etc/cloudflared/cert.pem --config /etc/cloudflared/config.yml run volumes: - ./docker/cloudflared/config.yml:/etc/cloudflared/config.yml:ro - ./docker/cloudflared/credentials.json:/etc/cloudflared/credentials.json:ro - ./docker/cloudflared/cert.pem:/etc/cloudflared/cert.pem:ro networks: - frankclaw restart: unless-stopped networks: frankclaw: driver: bridge volumes: frankclaw-state: