# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use an official Node.js runtime as a parent image
FROM node:18-alpine AS builder
# Set the working directory
WORKDIR /app
# Copy the package files
COPY package.json package-lock.json ./
# Install dependencies
RUN npm install
# Copy the rest of the application code
COPY . .
# Build the TypeScript application
RUN npm run build
# Use a smaller Node.js runtime for the production build
FROM node:18-alpine AS runner
# Set the working directory
WORKDIR /app
# Copy the built application from the builder stage
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/node_modules ./node_modules
# Expose port (if applicable, specify the port that your server listens on)
EXPOSE 3000
# Command to run the application
CMD ["node", "./dist/index.js"]