UNPKG

backend-mcp

Version:

Generador automático de backends con Node.js, Express, Prisma y módulos configurables. Servidor MCP compatible con npx para agentes IA. Soporta PostgreSQL, MySQL, MongoDB y SQLite.

232 lines (208 loc) 5.63 kB
# modules/docker/manifest.yaml module: name: "docker" version: "1.0.0" description: "Containerización completa con Docker y Docker Compose para desarrollo y producción" category: "deployment" triggers: - condition: "needs_containerization" value: true - condition: "wants_docker" value: true - condition: "deployment_ready" value: true - condition: "microservices_architecture" value: true entry_points: main: "templates/Dockerfile.hbs" compose_dev: "templates/docker-compose.yml.hbs" compose_prod: "templates/docker-compose.prod.yml.hbs" dockerignore: "templates/.dockerignore.hbs" nginx: "templates/nginx.conf.hbs" dependencies: required: [] optional: - "database" - "cache" - "logging" - "email" environment_variables: required: - NODE_ENV - PORT optional: - DOCKER_REGISTRY - COMPOSE_PROJECT_NAME - NGINX_PORT - SSL_CERT_PATH - SSL_KEY_PATH features: - "multi-stage-builds" - "development-compose" - "production-compose" - "nginx-reverse-proxy" - "ssl-termination" - "health-checks" - "volume-management" - "network-isolation" - "environment-specific-configs" - "docker-secrets" - "auto-restart-policies" - "resource-limits" api_endpoints: [] generated_files: - "Dockerfile" - "docker-compose.yml" - "docker-compose.prod.yml" - "docker-compose.override.yml" - ".dockerignore" - "nginx/nginx.conf" - "nginx/ssl/" - "scripts/docker-build.sh" - "scripts/docker-deploy.sh" integration: database_support: - "postgres" - "mysql" - "mongodb" - "redis" cache_integration: - "redis-service" - "memcached-service" logging_integration: - "centralized-logging" - "log-aggregation" monitoring_integration: - "health-checks" - "metrics-collection" container_types: - name: "app" description: "Main application container" base_image: "node:18-alpine" features: ["multi-stage", "security-hardened"] - name: "nginx" description: "Reverse proxy and static files" base_image: "nginx:alpine" features: ["ssl-termination", "gzip-compression"] - name: "database" description: "Database container (if needed)" base_image: "postgres:15-alpine" features: ["persistent-volumes", "backup-ready"] network_configuration: - name: "app-network" driver: "bridge" internal: false - name: "db-network" driver: "bridge" internal: true volume_configuration: - name: "app-data" type: "named" backup: true - name: "db-data" type: "named" backup: true - name: "nginx-logs" type: "bind" backup: false security_features: - "non-root-user" - "minimal-base-images" - "security-scanning" - "secrets-management" - "network-isolation" - "read-only-filesystem" optimization_features: - "layer-caching" - "multi-stage-builds" - "dependency-caching" - "image-compression" - "resource-limits" monitoring_features: - "health-checks" - "container-metrics" - "log-aggregation" - "performance-monitoring" usage_examples: - "Single container app" - "Multi-service architecture" - "Development environment" - "Production deployment" - "CI/CD integration" - "Kubernetes preparation" ai_instructions: | Use this module when: - User mentions "docker", "containerization", "deployment", "production" - Project needs to be containerized for deployment - Development environment standardization is required - Microservices architecture is being implemented Configuration steps: 1. Detect project structure and dependencies 2. Generate appropriate Dockerfile with multi-stage builds 3. Create docker-compose.yml for development 4. Create docker-compose.prod.yml for production 5. Configure nginx reverse proxy if needed 6. Set up health checks and monitoring 7. Configure volumes and networks 8. Add security hardening Always consider: - Database containers (if database module is used) - Cache containers (if cache module is used) - SSL termination for production - Environment-specific configurations - Resource limits and health checks automation: scripts: - "docker-build.sh": "Build all containers" - "docker-deploy.sh": "Deploy to production" - "docker-dev.sh": "Start development environment" - "docker-logs.sh": "Aggregate container logs" - "docker-backup.sh": "Backup volumes and data" testing: - "Container build tests" - "Service connectivity tests" - "Health check validation" - "Performance benchmarks" - "Security scanning" performance: optimizations: - "Multi-stage builds for smaller images" - "Layer caching strategies" - "Dependency optimization" - "Resource limit tuning" metrics: - "Build time" - "Image size" - "Container startup time" - "Memory usage" - "CPU utilization" scaling: horizontal: - "Load balancer configuration" - "Service discovery" - "Auto-scaling policies" vertical: - "Resource limit adjustment" - "Performance monitoring" security: best_practices: - "Non-root user execution" - "Minimal base images" - "Security scanning integration" - "Secrets management" - "Network segmentation" compliance: - "CIS Docker Benchmark" - "NIST container security" compatibility: docker_versions: - "Docker Engine 20.10+" - "Docker Compose 2.0+" platforms: - "Linux (x86_64, ARM64)" - "macOS (Intel, Apple Silicon)" - "Windows (WSL2)" orchestrators: - "Docker Swarm" - "Kubernetes (preparation)" - "Docker Compose"