Skip to content

build(indexer): slim Docker image with multi-stage build - #326

Open
jeffrey-graham wants to merge 1 commit into
prism-explorer:mainfrom
jeffrey-graham:build/slim-indexer-multi-stage-dockerfile-303
Open

jeffrey-graham wants to merge 1 commit into
prism-explorer:mainfrom
jeffrey-graham:build/slim-indexer-multi-stage-dockerfile-303

Conversation

@jeffrey-graham

Copy link
Copy Markdown

Summary

  • Converts indexer/Dockerfile into a two-stage (builder + runner) build:
    • builder installs all dependencies (npm ci), generates the Prisma client (npx prisma generate), compiles TypeScript (npm run build), and prunes devDependencies (npm prune --omit=dev).
    • runner copies only package.json, production node_modules (including the generated Prisma client and CLI), prisma/, and compiled dist/, leaving TypeScript, Vitest, ESLint, tsx, @types/node, typescript-eslint, and src/ out of the runtime image (~120 MB reduction in node_modules and build artifacts).
  • Moves prisma from devDependencies to dependencies in indexer/package.json (and package-lock.json) so npx prisma migrate deploy continues to run at container startup.

Verification

  • Ran npx tsc --noEmit, npm run lint, npm test, and npm run build in indexer/.

Closes #303

@vercel

vercel Bot commented Nov 10, 2026

Copy link
Copy Markdown

@jeff-graham-ai is attempting to deploy a commit to the thewealthyplace100-8633's projects Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
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.

Slim the indexer image with a multi-stage build

2 participants