FROM node:20-alpine WORKDIR /app # Copy package files COPY package*.json ./ # Install dependencies RUN npm ci # Copy source code COPY . . # Build TypeScript RUN npm run build # Remove source files to reduce image size (optional) # RUN rm -rf src tsconfig.json # Start the app CMD ["npm", "start"]