FROM node:22-alpine AS base # Rebuild the source code only when needed FROM base WORKDIR /app COPY . . # Install dependencies RUN npm install # Generate Prisma client RUN npm run prisma:generate # Build the project RUN npm run api:build # Start the server ENTRYPOINT [ "npm", "run", "api:start" ]