# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
FROM node:lts-alpine AS build
WORKDIR /app
# Install dependencies including dev for build
COPY package.json package-lock.json* pnpm-lock.yaml* ./
RUN npm install
# Copy source
COPY . .
# Build the project
RUN npm run build
# Production image
FROM node:lts-alpine AS runtime
WORKDIR /app
# Copy only production dependencies
COPY package.json package-lock.json* pnpm-lock.yaml* ./
RUN npm install --production
# Copy built files
COPY --from=build /app/dist ./dist
# Default command
CMD ["node", "dist/index.js"]