Dockerfile•1.34 kB
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Enhanced AutoGen MCP Server with modern architecture
FROM node:lts-alpine AS builder
# Create app directory
WORKDIR /app
# Install app dependencies
COPY package*.json ./
RUN npm install --ignore-scripts
# Bundle app source
COPY . .
# Build the enhanced app
RUN npm run build
# Production stage
FROM node:lts-alpine
# Create app directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install production dependencies only
RUN npm ci --only=production --ignore-scripts
# Copy built application
COPY --from=builder /app/build ./build
# Copy configuration files
COPY --from=builder /app/src/autogen_mcp ./src/autogen_mcp
# Create necessary directories
RUN mkdir -p ./workspace ./logs
# Add health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD node -e "const http = require('http'); \
const req = http.request({hostname: 'localhost', port: 3001, path: '/health', method: 'GET'}, \
(res) => process.exit(res.statusCode === 200 ? 0 : 1)); \
req.on('error', () => process.exit(1)); \
req.end();" || exit 1
# Expose port for HTTP mode
EXPOSE 3001
# Start the enhanced server in stdio mode by default
CMD ["node", "build/enhanced_index.js"]