Add Docker Compose dev stack and local Supabase setup

🟢 open · #44 · willchen96/mike ← 0xNadr/mike · opened 18d ago by 0xNadr · +922-1 across 9 files · ↗ on GitHub

From the PR description

Summary

  • docker compose up now brings up frontend (:4000) and backend (:4001) with bind-mounted source for hot reload.
  • supabase init scaffolding plus the existing one-shot schema copied into supabase/migrations/, so supabase start brings up local Postgres + Auth + Storage + Realtime and auto-applies the schema.
  • README gains a "Run locally with Docker" section above the existing manual setup, including ports, env wiring (host.docker.internal for server-side, localhost for browser), and the one-time storage bucket bootstrap.

The container command runs npm install on start instead of relying on the image's baked node_modules. This works around a Docker Desktop quirk where a named volume mounted on top of a bind-mounted /app gets a partial copy of node_modules from the image (e.g. Next was missing format-cli-help-output).

Default ports moved to 4000/4001 to avoid colliding with anything else commonly running on 3000/3001. The legacy npm run dev workflow still uses 3000/3001 and is unaffected.

Test plan

  • supabase start brings up the Supabase stack and applies the migration (15 tables in public)
  • docker compose up -d starts both Mike services
  • curl http://localhost:4001/health returns {"ok":true}
  • curl http://localhost:4000/ redirects to /assistant (HTTP 200, ~30KB)
  • Backend container reaches Supabase Auth via host.docker.internal:54321
  • Source edits hot-reload inside both containers

Our analysis

Dockerize local dev with Supabase scaffolding — read the full analysis →

Think the analysis missed something the PR description covers?

Commits in this PR (1)

SHA Subject Author Date
b671622e Add Docker Compose dev stack and local Supabase setup Nader 2026-05-08 ↗ GitHub
commit body
Two services in docker-compose.yml (frontend on :4000, backend on :4001)
with bind-mounted source for hot reload. Container command runs `npm install`
on start to work around a Docker Desktop named-volume init quirk where
node_modules from the image gets a partial copy when overlapped by a bind
mount.

`supabase init` scaffolding with the existing one-shot schema copied into
supabase/migrations/ so `supabase start` brings up Postgres + Auth +
Storage + Realtime locally and applies the schema automatically.

README: new "Run locally with Docker" section covering ports, env wiring
(host.docker.internal for server-side, localhost for browser), and the
storage bucket bootstrap.

Capture this PR into my fork

Download a Markdown prompt that tells Claude how to port every commit in this PR into your working tree. Run it via claude -p < capture-pull-44.md from inside the repo you want the changes in.

⬇ Download capture-pull-44.md