# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# syntax=docker/dockerfile:1
# Builder stage
FROM node:lts-alpine AS builder
WORKDIR /app
# Copy manifest and lock file
COPY package.json yarn.lock tsconfig.json tsup.config.ts ./
COPY src ./src
# Install dependencies and build
RUN yarn install --frozen-lockfile && yarn build
# Runner stage
FROM node:lts-alpine AS runner
WORKDIR /app
# Copy package.json, lockfile and built lib
COPY --from=builder /app/package.json /app/yarn.lock ./
COPY --from=builder /app/lib ./lib
# Install production dependencies only
RUN yarn install --frozen-lockfile --production
ENV NODE_ENV=production
# Default entrypoint to start MCP server with dotenv
ENTRYPOINT ["node", "-r", "dotenv/config", "lib/index.js"]