Skip to content

feat: add Docker Compose support for running Boop permanently in background #9

@kaihere14

Description

@kaihere14

Summary

Add a docker-compose.yml + Dockerfile so users can run Boop as a persistent
background service instead of keeping a terminal open with npm run dev.


Motivation

The current npm run dev workflow is great for first-run and development but doesn't
work well for always-on use. If you close your terminal or reboot, the agent goes
offline. A Docker Compose setup lets users run Boop like a proper background service —
survives reboots, restarts on crash, and has clean log management.


Proposed solution

Add the following files to the repo root:

  • Dockerfile — builds the server (server/index.ts via tsx)
  • Dockerfile.debug — builds and serves the Vite debug dashboard
  • docker-compose.yml — orchestrates both services with restart: unless-stopped
  • DOCKER.md — setup guide

Services in the compose file

Service What it does
server Express backend + agent loop, port 3456
debug Vite debug dashboard, port 5173
tunnel Cloudflare Tunnel sidecar — stable public URL for Sendblue webhook (opt-in via --profile tunnel)

Key design decisions

Claude Code credentials — the container mounts ~/.claude read-only from the host
so the Agent SDK can reuse the existing session. No ANTHROPIC_API_KEY required.

Convex is not containerized — it's a hosted cloud service. Users just need to have
run npx convex deploy once; no local Convex process is needed at runtime.

Cloudflare Tunnel instead of ngrok — free ngrok rotates URLs on restart which breaks
the Sendblue webhook. The tunnel service offers a stable URL as an opt-in
--profile tunnel sidecar. Users on a VPS can skip it and just set PUBLIC_URL directly.

npm run dev is untouched — purely additive. Existing dev workflow stays exactly as is.

Basic usage after merging

# one-time: sign in to Claude Code on the host, deploy Convex
claude
npx convex deploy

# run permanently in background
docker compose up -d

# with Cloudflare Tunnel for stable Sendblue webhook
docker compose --profile tunnel up -d

# update after git pull
docker compose up -d --build

What this is NOT

  • Not a production hardening PR — no secrets manager, no multi-arch builds, no k8s manifests
  • Not changing any server code — pure infra files
  • Not breaking any existing workflow

Checklist before opening a PR

  • Dockerfile builds clean from repo root
  • docker compose up -d starts server + dashboard successfully
  • ~/.claude mount is documented clearly (common gotcha)
  • DOCKER.md covers the Cloudflare Tunnel setup steps
  • CHANGELOG.md updated under Unreleased (non-breaking addition)
  • Works on a fresh clone with only .env.local already filled in

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions