mcptesta/docs/Dockerfile
Ryan Malloy bea4a2e5d3 Initial release: MCPTesta v1.0.0 🧪
Community-driven testing excellence for the MCP ecosystem

MCPTesta is a comprehensive testing framework for FastMCP servers that brings
scientific rigor and enterprise-grade capabilities to MCP protocol testing.

🎯 Core Features:
• Comprehensive FastMCP server testing with advanced protocol support
• Parallel execution with intelligent dependency resolution
• Flexible CLI and YAML configuration system
• Rich reporting: console, HTML, JSON, and JUnit formats
• Advanced MCP protocol features: notifications, cancellation, progress tracking
• Production-ready Docker environment with caddy-docker-proxy integration

🧪 Advanced Testing Capabilities:
• Multi-transport support (stdio, SSE, WebSocket)
• Authentication testing (Bearer tokens, OAuth flows)
• Stress testing and performance validation
• Memory profiling and leak detection
• CI/CD integration with comprehensive reporting

🎨 Professional Assets:
• Complete logo package with lab experiment theme
• Comprehensive documentation with Diátaxis framework
• Community-focused branding and messaging
• Multi-platform favicon and social media assets

📚 Documentation:
• Getting started tutorials and comprehensive guides
• Complete CLI and YAML reference documentation
• Architecture explanations and testing strategies
• Team collaboration and security compliance guides

🚀 Ready for:
• Community contributions and external development
• Enterprise deployment and production use
• Integration with existing FastMCP workflows
• Extension and customization for specific needs

Built with modern Python practices using uv, FastMCP, and Starlight documentation.
Designed for developers who demand scientific precision in their testing tools.

Repository: https://git.supported.systems/mcp/mcptesta
Documentation: https://mcptesta.l.supported.systems
2025-09-20 03:20:49 -06:00

129 lines
3.2 KiB
Docker

# Multi-stage Dockerfile for MCPTesta Documentation
# Supports both development and production modes
# Base stage with Node.js
FROM node:20-alpine AS base
WORKDIR /app
# Install system dependencies
RUN apk add --no-cache \
dumb-init \
curl \
wget \
&& rm -rf /var/cache/apk/*
# Create non-root user
RUN addgroup -g 1001 -S nodejs && \
adduser -S astro -u 1001 -G nodejs
# Copy package files
COPY package*.json ./
# Dependencies stage
FROM base AS deps
RUN npm ci --only=production && npm cache clean --force
# Development dependencies stage
FROM base AS dev-deps
RUN npm ci && npm cache clean --force
# Builder stage for production builds
FROM dev-deps AS builder
COPY . .
RUN npm run build
# Development stage with hot reloading
FROM dev-deps AS development
COPY . .
# Change ownership to non-root user
RUN chown -R astro:nodejs /app
USER astro
EXPOSE 4321
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:4321/ || exit 1
# Use dumb-init for proper signal handling
ENTRYPOINT ["dumb-init", "--"]
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0", "--port", "4321"]
# Production stage with static files
FROM nginx:alpine AS production
# Install security updates
RUN apk update && apk upgrade && \
apk add --no-cache dumb-init && \
rm -rf /var/cache/apk/*
# Copy built site from builder stage
COPY --from=builder /app/dist /usr/share/nginx/html
# Custom nginx configuration for Astro
COPY <<EOF /etc/nginx/conf.d/default.conf
server {
listen 4321;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
# Security headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
# Gzip compression
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_types
text/plain
text/css
text/xml
text/javascript
application/javascript
application/xml+rss
application/json;
# Cache static assets
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
# Handle client-side routing
location / {
try_files \$uri \$uri/ /index.html;
}
# Health check endpoint
location /health {
access_log off;
return 200 "healthy\n";
add_header Content-Type text/plain;
}
}
EOF
# Create non-root user for nginx
RUN addgroup -g 1001 -S nginx_user && \
adduser -S nginx_user -u 1001 -G nginx_user
# Fix permissions
RUN chown -R nginx_user:nginx_user /usr/share/nginx/html && \
chown -R nginx_user:nginx_user /var/cache/nginx && \
chown -R nginx_user:nginx_user /var/log/nginx && \
chown -R nginx_user:nginx_user /etc/nginx/conf.d
USER nginx_user
EXPOSE 4321
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:4321/health || exit 1
ENTRYPOINT ["dumb-init", "--"]
CMD ["nginx", "-g", "daemon off;"]