Skip to content

Instantly share code, notes, and snippets.

@ikamal7
Created December 1, 2025 08:23
Show Gist options
  • Select an option

  • Save ikamal7/51bff1785429c250764e85aa75b6facc to your computer and use it in GitHub Desktop.

Select an option

Save ikamal7/51bff1785429c250764e85aa75b6facc to your computer and use it in GitHub Desktop.
FROM node:20-bullseye
WORKDIR /app
# Copy only package files to install deps
COPY package.json package-lock.json* ./
RUN npm install
# Copy source code INCLUDING prisma now
COPY . .
# Generate Prisma client AFTER schema is copied
RUN npx prisma generate
# Build app
RUN npm run build
# Production prune
RUN npm prune --production
EXPOSE 3000
CMD ["npm", "run", "docker-start"]

Comments are disabled for this gist.