# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use an official Node.js image as the base image
FROM node:22-alpine AS builder
# Set the working directory
WORKDIR /app
# Copy package files
COPY package.json package-lock.json ./
# Install dependencies
RUN --mount=type=cache,target=/root/.npm npm install
# Copy the rest of the application's source code
COPY . .
# Build the application
RUN npm run build
# Use a smaller Node.js image for the runtime
FROM node:22-alpine AS runtime
# Set the working directory
WORKDIR /app
# Copy built files from the builder stage
COPY --from=builder /app/bin /app/bin
COPY --from=builder /app/node_modules /app/node_modules
# Environment variable for Contentful Management API token
ENV CONTENTFUL_MANAGEMENT_ACCESS_TOKEN=your_contentful_management_api_token
# Expose any required ports (if needed by the application)
# EXPOSE 3000
# Start the server
ENTRYPOINT ["node", "bin/mcp-server.js"]