Self-contained Docker stack replaces hosted Supabase, Postgres, auth, and S3

A Copilot-authored PR proposes running the full mike stack on a single host using only open-source components - no hosted Supabase, no managed Postgres, no cloud object storage. The change is a complete deployment re-architecture: new Dockerfiles, compose orchestration, an nginx gateway, MinIO for storage, and automated schema seeding.

infrastructuresecurity

The hosted dependencies get swapped out one-to-one. Managed Postgres becomes supabase/postgres. Auth stays GoTrue, but runs behind an nginx gateway rather than Supabase's hosted plane. The data API stays PostgREST. Object storage becomes MinIO, with an init script that provisions the bucket on first start.

Two multi-stage Dockerfiles cover frontend and backend. The backend image bundles LibreOffice directly so DOC/DOCX-to-PDF conversion keeps working inside the container. The frontend switches to Next.js standalone output mode to keep the image size down. A pair of compose files split the use cases: one for local dev with live mounts, one for production that pulls prebuilt images from GHCR. A GitHub Actions workflow handles building and publishing both images.

Bootstrap is mostly automated. Mounted SQL files seed the schema and grant PostgREST roles (anon, authenticated, service_role) on the public schema. The auth contract is preserved: the backend's requireAuth path still calls getUser(token) through the nginx gateway to GoTrue, keeping the same call shape as the hosted path. RLS policies using auth.users and auth.uid() continue to work because those are served by the Supabase Postgres image.

Two docs accompany the change: a local quickstart and a production deployment guide. Root-level .env templates cover the new service addresses.

So what Worth a look if you need to run mike in an air-gapped environment or want to eliminate cloud service dependencies entirely. The auth contract preservation is the most careful part - `requireAuth` still goes through GoTrue rather than bypassing it. Skip it if you're already comfortable with managed Supabase and don't need on-prem deployment.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?