# Dockerfile # Build stage FROM node:18-alpine as build # Set working directory WORKDIR /app # Copy package files COPY package*.json ./ # Install dependencies RUN npm install # Copy source code COPY . . # Build the application RUN npm run build # Production stage FROM node:18-alpine WORKDIR /app # Copy built assets from build stage COPY --from=build /app/dist ./dist COPY --from=build /app/node_modules ./node_modules COPY --from=build /app/package*.json ./ # Expose port EXPOSE 3000 # Start the application CMD ["npm", "start"]