1Dockerfile2ARG NODE_VERSION=223ARG PNPM_VERSION=9.4.04 5FROM node:${NODE_VERSION}-alpine AS base6 7WORKDIR /usr/src/app8 9RUN --mount=type=cache,target=/root/.npm \10 npm install -g pnpm@${PNPM_VERSION}11 12FROM base AS build13 14RUN --mount=type=bind,source=package.json,target=package.json \15 --mount=type=bind,source=pnpm-lock.yaml,target=pnpm-lock.yaml \16 --mount=type=cache,target=/root/.local/share/pnpm/store \17 pnpm install --frozen-lockfile18 19COPY . .20 21RUN pnpm run prisma:generate && pnpm run build22 23FROM build AS deps24 25RUN pnpm prune --prod26 27FROM base AS final28WORKDIR /app29 30ENV NODE_ENV=production31 32COPY package.json .33COPY --from=deps /usr/src/app/node_modules ./node_modules34COPY --from=build /usr/src/app/dist ./dist35COPY --from=build /usr/src/app/prisma ./prisma36 37WORKDIR /app/dist/src38EXPOSE 300039CMD ["index.js"]
1# Include any files or directories that you don't want to be copied to your2# container here (e.g., local build artifacts, temporary files, etc.).3#4# For more help, visit the .dockerignore file reference guide at5# https://docs.docker.com/go/build-context-dockerignore/6 7**/.classpath8**/.dockerignore9**/.env10**/.git11**/.gitignore12**/.project13**/.settings14**/.toolstarget15**/.vs16**/.vscode17**/.next18**/.cache19**/*.*proj.user20**/*.dbmdl21**/*.jfm22**/charts23**/docker-compose*24**/compose.y*ml25**/Dockerfile*26**/node_modules27**/npm-debug.log28**/obj29**/secrets.dev.yaml30**/values.dev.yaml31**/build32**/dist33LICENSE34README.md