Furious-Industries adds a 9-service Docker Compose stack for bare-metal self-hosting

One commit turns Mike into a fully self-contained local stack: Supabase Postgres + GoTrue + PostgREST + Kong, MinIO for storage, one-shot setup containers, and the Mike backend and frontend -- all driven by a single `.env.example` where `SERVER_HOST` is the only value you change. Two application-layer fixes come along for the ride and are worth pulling regardless.

infrastructuresecurity

The Compose file defines 9 services. Supabase runs self-hosted (Postgres, GoTrue, PostgREST, Kong 2.8.1); MinIO replaces Cloudflare R2; a minio-setup container creates the bucket on first boot; a migrate container waits for GoTrue readiness before applying the schema. The Mike backend is Node 22 with LibreOffice installed for DOC/DOCX-to-PDF conversion, and the frontend uses output: "standalone" for a slim image. One SERVER_HOST value in .env.example drives everything else.

The file ships with Supabase's public development JWT keys and says so clearly, with instructions to regenerate before internet exposure. Worth double-checking before use: a SUPABASE_SECRET_KEY line appears under the frontend build args section, which would bake a service role key into the Next.js bundle at build time. That looks like a copy-paste error.

Two application changes in this commit are worth pulling on their own. backend/src/lib/storage.ts adds forcePathStyle: true to the S3 client (required by MinIO, harmless for R2) and adds a S3_PUBLIC_ENDPOINT_URL override so presigned download URLs reference a browser-reachable host rather than the docker-internal minio hostname. That second fix resolves a real bug class for any non-R2 storage backend. The next.config.ts change to output: "standalone" is a clean addition for Docker deployments generally.

The fork's intent is clear: on-prem or homelab self-hosting as a deliberate product direction, with local development as a secondary benefit.

So what Worth a look if you want a starting point for running Mike on bare metal or a homelab box. The `storage.ts` MinIO fixes are worth cherry-picking even if you skip the Compose stack -- they fix a real presigned-URL bug for any non-R2 S3 deployment. Audit the `SUPABASE_SECRET_KEY` in the frontend build args before shipping.

View this fork on GitHub →

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

Commits in this thread

1 commit from Furious-Industries/mike, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
4de37127 Add self-hosted Docker Compose stack S J 2026-05-02 ↗ GitHub
commit body
Full self-contained stack for running Mike on a local Linux server with
no external cloud dependencies.

Services: Supabase Postgres, GoTrue auth, PostgREST, Kong API gateway,
MinIO S3-compatible storage, Mike backend (with LibreOffice), Next.js
frontend.

- backend/Dockerfile: Node 22 + LibreOffice for DOC/DOCX conversion
- frontend/Dockerfile: Next.js standalone build; NEXT_PUBLIC_* vars
  baked in at build time via build args
- docker-compose.yml: full 9-service stack with health-check ordering
- docker/kong.yml: routes /auth/v1/* and /rest/v1/* behind single port
- docker/migrate.sh: waits for GoTrue, runs one-shot schema migration
- docker/volumes/db/roles.sql|jwt.sql: Postgres init scripts for
  service role passwords and JWT secret
- .env.example: single config file; only SERVER_HOST + passwords need
  changing per machine
- storage.ts: added forcePathStyle (MinIO requirement) and
  S3_PUBLIC_ENDPOINT_URL for presigned URLs reachable from the browser
- next.config.ts: added output: standalone for Docker build

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-136.md from inside the repo you want the changes in.

⬇ Download capture-thread-136.md