# Use Node.js Alpine image FROM node:18-alpine # Set working directory WORKDIR /app # Copy package files COPY package.json package-lock.json ./ # Install dependencies RUN npm ci --only=production # Copy source code COPY . . # Build the application RUN npm run build # Expose port EXPOSE 8080 # Start the application CMD ["npm", "start"]