# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use a Node.js image as the base
FROM node:18-alpine AS builder
# Set working directory
WORKDIR /app
# Copy package.json and package-lock.json
COPY package.json package-lock.json ./
# Install dependencies
RUN npm install
# Copy the rest of the application code
COPY . .
# Build the application
RUN npm run build
# Start a new stage for the release
FROM node:18-alpine
# Set working directory
WORKDIR /app
# Copy build artifacts and necessary files from builder stage
COPY --from=builder /app/build /app/build
COPY --from=builder /app/node_modules /app/node_modules
COPY --from=builder /app/package.json /app/package.json
# Copy the configuration file
COPY config.yaml /app/config.yaml
# Specify the command to run the server
CMD ["node", "build/index.js"]