perf: use Next.js standalone output for frontend image

↗ view on GitHub · Lef · 2026-05-05 · 8d411844

Drops mike-frontend image from 1.98 GB to ~465 MB (76% reduction)
by relying on Next.js's standalone output mode. Standalone bundles
only the node_modules subset the server actually requires at runtime
instead of copying the whole build-stage tree (which still contains
devDeps after npm ci).

Two changes:
- frontend/next.config.ts: add output: 'standalone'.
- docker/frontend.Dockerfile: runtime stage now copies .next/standalone
  + .next/static + public, and runs 'node server.js' instead of
  'npm run start'.

The standalone server still picks up the NEXT_PUBLIC_* values that
were baked at build time, so behaviour is unchanged.
Repository Lef-F/mike
Author Lef <Lef-F@users.noreply.github.com>
Authored
Parents 653d0550
Stats 2 files changed , +9 , -7
Part of Self-host docker-compose stack

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-8d411844.md from inside the repo you want the change in.

⬇ Download capture-commit-8d411844.md