Self-hosted Docker stack (embedded Supabase + storage + email) and local Ollama models

🟢 open · #196 · Open-Legal-Products/mike ← thijsdezoete/mike · opened 20d ago by thijsdezoete · +758-17 across 23 files · ↗ on GitHub

From the PR description

Summary

A single docker compose up brings up the entire app with no external accounts - a more automated alternative to the CLI-based approach in #44, plus local LLM support.

Self-contained stack

  • Embedded Supabase in compose: Postgres + GoTrue auth + PostgREST + an nginx gateway. Schema auto-loads on first boot; no supabase CLI needed.
  • RustFS for S3-compatible object storage, replacing Cloudflare R2 (the backend already uses path-style S3, so it's drop-in).
  • Mailpit catches auth emails (signup/confirmation) in a local inbox at :8025.
  • Production-style image builds (not bind-mount + npm install on start).

Local models via Ollama

  • New provider speaking Ollama's OpenAI-compatible chat API, with the agentic tool-call loop and a graceful fallback for models that don't support tools.
  • Models detected dynamically (GET /models/ollama) and shown in every picker (chat, title, tabular) under a Local group - no API key. Any ollama/<tag> id is valid by prefix.
  • A Refresh button on the API Keys page re-detects installed models and re-checks key status, live to the pickers.

How this differs from #44

  • One command, all-in-one - no supabase start, no fork of the Supabase CLI stack.
  • Embedded Supabase + RustFS + Mailpit vs. relying on the CLI's Supabase + Storage.
  • Adds local LLM (Ollama) support, which #44 doesn't have.

Test plan

  • docker compose up --build brings up all services; schema auto-applies (23 public tables)
  • End-to-end signup → Mailpit confirmation email → confirm → login
  • Chat streams from ollama/qwen3.6; phi3:mini falls back to no-tools
  • GET /models/ollama returns installed models (401 unauthenticated)
  • Ollama models selectable as chat + tabular review models

🤖 Generated with Claude Code

Our analysis

Add self-hosted Docker stack with embedded Supabase and Ollama models — read the full analysis →

Self-hosted Docker stack with local Supabase, storage, email, and Ollama — read the full analysis →

Think the analysis missed something the PR description covers?

Commits in this PR (1)

SHA Subject Author Date
230ba0ef Add self-hosted Docker stack with local Supabase, storage, email, and Ollama Thijs de Zoete 2026-06-29 ↗ GitHub
commit body
Bring the whole app up with a single `docker compose up` and no external
accounts.

Self-contained stack:
- Embedded Supabase (Postgres + GoTrue auth + PostgREST + an nginx gateway),
  with the schema auto-loaded on first boot and auth emails auto-confirmable.
- RustFS for S3-compatible object storage, replacing Cloudflare R2.
- Mailpit catches auth emails (signup/confirmation) in a local inbox.
- Production-style image builds for the frontend and backend.

Local models via Ollama:
- New provider speaking Ollama's OpenAI-compatible chat API, including the
  agentic tool-call loop and a graceful fallback for models that don't
  support tools.
- Models are detected dynamically (GET /models/ollama) and appear in every
  model picker (chat, title, tabular review) under a "Local" group, with no
  API key required. Any `ollama/<tag>` id is valid by prefix.
- Manual "Refresh" button on the API Keys page re-detects installed models
  and re-checks key status, pushing updates live to the pickers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

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-196.md from inside the repo you want the changes in.

⬇ Download capture-pull-196.md