Skip to content

Reduce release image size - #35

Merged
freshwax-codex[bot] merged 1 commit into
mainfrom
codex/reduce-release-image-size
Jul 23, 2026
Merged

Reduce release image size#35
freshwax-codex[bot] merged 1 commit into
mainfrom
codex/reduce-release-image-size

Conversation

@freshwax-codex

@freshwax-codex freshwax-codex Bot commented Jul 23, 2026

Copy link
Copy Markdown

Summary

  • package the Next.js standalone runtime instead of the full production dependency tree
  • bundle the BullMQ worker ahead of time while sharing the generated Prisma client
  • retain automatic versioned migrations through an isolated, version-matched Prisma CLI
  • report compressed image and layer sizes in the release workflow

Impact

The locally built Linux image measured approximately 176 MB compressed, down from the current approximately 350 MB release image. Startup remains a single-container flow: migration preparation and prisma migrate deploy run first, followed by the worker and web server.

The migration preparation script runs beside the standalone Prisma client and receives the isolated CLI path explicitly. This keeps container startup offline-safe and prevents Prisma from installing packages into the running container.

Validation

  • npm run lint
  • npx prisma validate
  • npx prisma generate
  • npm run build
  • built and inspected the conflict-resolved Linux Docker image
  • verified clean automatic migration, web health, and bundled worker operation
  • verified populated schema upgrades from v0.0.4 and v0.1.0
  • verified FRESHWAX_SKIP_DB_PUSH and FRESHWAX_DISABLE_WORKER
  • verified missing-variable and migration-failure paths
  • verified signal propagation and shutdown
  • validated release workflow YAML and image-size reporting expressions

@Muukuro
Muukuro marked this pull request as ready for review July 23, 2026 19:39
@freshwax-codex
freshwax-codex Bot force-pushed the codex/reduce-release-image-size branch from 16c1eb4 to 4578955 Compare July 23, 2026 19:45
@freshwax-codex
freshwax-codex Bot merged commit b0004bf into main Jul 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant