# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use a Node.js image for building
FROM node:18-alpine AS builder
# Set the working directory
WORKDIR /app
# Copy the package.json and package-lock.json to the working directory
COPY package.json package-lock.json ./
# Install the dependencies
RUN npm install
# Copy the entire project to the working directory
COPY . .
# Build the project
RUN npm run build
# Use a smaller Node.js image for the final output
FROM node:18-alpine
# Set the working directory
WORKDIR /app
# Copy the build output and package files from the builder stage
COPY --from=builder /app/build /app/build
COPY --from=builder /app/package.json /app/package.json
COPY --from=builder /app/package-lock.json /app/package-lock.json
# Install only production dependencies
RUN npm ci --omit=dev
# Set the entrypoint command
ENTRYPOINT ["node", "build/index.js"]