# Use Node.js LTS as the base image
FROM node:20-alpine
# Set working directory
WORKDIR /app
# Copy package files
COPY package.json pnpm-lock.yaml ./
# Install pnpm
RUN npm install -g pnpm
# Install dependencies
RUN pnpm install --frozen-lockfile
# Copy application code
COPY . .
# Expose the port the app runs on
EXPOSE 3000
# Command to run the application
CMD ["pnpm", "start"]