# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use the official Node.js 18 image as a build environment
FROM node:18 AS builder
# Set the working directory in the container
WORKDIR /app
# Copy package.json and package-lock.json files to the container
COPY package.json package-lock.json ./
# Install dependencies
RUN npm install
# Copy the rest of the application files to the container
COPY . .
# Build the TypeScript code
RUN npm run build
# Use a minimal Node.js image for the production environment
FROM node:18-slim AS production
# Set the working directory in the container
WORKDIR /app
# Copy the built files and node_modules from the builder stage
COPY --from=builder /app/build ./build
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./
# Set the environment variable for the Portkey API key
# This can be overridden by the user during runtime
ENV PORTKEY_API_KEY=your_portkey_api_key_here
# Specify the command to run the MCP server
CMD ["node", "build/index.js"]