feat(build): bundled multistage Dockerfile + static export config

↗ view on GitHub · Allen Morgan · 2026-05-08 · d829a171

Single image for the application: Next.js builds the frontend as a
static export and the Dockerfile copies the resulting /out tree into
the backend image's /app/public.  The Express server picks it up at
runtime when the directory is present (see the static-frontend block in
backend/src/index.ts).

  * Dockerfile                   - three stages:
      backend-deps  : install + tsc + tree-shake the backend
      frontend-deps : install + next build with NEXT_PUBLIC_API_BASE_URL
                      passed in via --build-arg so the same image source
                      can target same-origin or split-origin deployments
      runtime       : node:lts-alpine + libreoffice (for docx convert)
                      with the built backend, prod node_modules, and
                      the frontend export.

  * .dockerignore                - excludes backend test fixtures,
                                   migrations directory artefacts, the
                                   frontend's .next/ debug output, and
                                   anything under .claude/.

  * frontend/next.config.ts       - output: "export" so the frontend
                                   produces a static SPA bundle that
                                   the backend can serve out of a
                                   single Express process.

  * frontend/.env.local.example   - documents the new minimal env
                                   surface: only NEXT_PUBLIC_API_BASE_URL
                                   plus the optional supabase-mode pair.

  * frontend/package.json + lockfile - bumps the dep set to match the
                                   updated context + lazy-supabase
                                   shape; resend dropped (unused).
Repository Altien/mikeOssAzure
Author Allen Morgan <amorgan@altien.com>
Authored
Parents 0c5fc8da
Stats 6 files changed , +740 , -656
Part of Bundled multistage Dockerfile + static export config

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

⬇ Download capture-commit-d829a171.md