<< All versions
Skill v1.0.0
currentLLM-judged scan95/100mwguerra/claude-code-plugins/compose
──Details
PublishedOctober 23, 2026 at 03:47 PM
Content Hashsha256:1128975914f84b38...
Git SHA965b237b3410
──Files
Files (1 file, 3.9 KB)
SKILL.md3.9 KBactive
SKILL.md · 244 lines · 3.9 KB
version: "1.0.0" name: compose description: Generate Compose configs with services, networking, volumes, and health checks
Docker Compose Configuration Skill
Overview
This skill generates Docker Compose configurations for multi-container applications. It creates properly structured compose files with:
- Service definitions
- Network configuration
- Volume management
- Health checks
- Dependencies
- Environment configuration
Activation
Use this skill when:
- Creating a new compose file
- Adding services to existing compose
- Configuring container orchestration
- Setting up development or production environments
Process
1. Understand Requirements
Gather information about:
- Required services (web, api, database, cache, etc.)
- Environment (development/production)
- Networking needs (internal, external, SSL)
- Persistence requirements
- Scaling needs
2. Consult Documentation
Read relevant documentation:
03-compose-fundamentals.mdfor structure04-networking.mdfor networks05-databases.mdfor database services06-services.mdfor dependencies08-volumes.mdfor persistence
3. Generate Configuration
Create compose file following best practices:
yaml
# Modern compose (no version field)services:app:build:context: .dockerfile: Dockerfilerestart: unless-stoppedports:- "3000:3000"environment:- NODE_ENV=productiondepends_on:db:condition: service_healthynetworks:- frontend- backendhealthcheck:test: ["CMD", "curl", "-f", "http://localhost:3000/health"]interval: 30stimeout: 10sretries: 3db:image: postgres:16-alpinerestart: unless-stoppedenvironment:POSTGRES_USER: ${DB_USER}POSTGRES_PASSWORD: ${DB_PASSWORD}POSTGRES_DB: ${DB_NAME}volumes:- postgres_data:/var/lib/postgresql/datanetworks:- backendhealthcheck:test: ["CMD-SHELL", "pg_isready -U ${DB_USER}"]interval: 10stimeout: 5sretries: 5volumes:postgres_data:networks:frontend:backend:internal: true
Service Patterns
Web Application
yaml
services:web:build: .ports:- "80:80"depends_on:- api
API Service
yaml
services:api:build: ./apiexpose:- "3000"environment:- DATABASE_URL=postgresql://user:pass@db:5432/appdepends_on:db:condition: service_healthy
Database Service
yaml
services:db:image: postgres:16-alpinevolumes:- db_data:/var/lib/postgresql/dataenvironment:POSTGRES_PASSWORD: ${DB_PASSWORD}healthcheck:test: ["CMD-SHELL", "pg_isready"]interval: 10sretries: 5
Cache Service
yaml
services:redis:image: redis:7-alpinecommand: redis-server --appendonly yesvolumes:- redis_data:/data
Background Worker
yaml
services:worker:build: .command: npm run workerdepends_on:- db- redis
Network Patterns
Internal Database Network
yaml
networks:backend:internal: true # No external access
External Shared Network
yaml
networks:proxy:external: truename: traefik_proxy
Volume Patterns
Named Volume
yaml
volumes:postgres_data:
Bind Mount (Development)
yaml
volumes:- ./src:/app/src
Anonymous Volume
yaml
volumes:- /app/node_modules
Environment Patterns
Direct Values
yaml
environment:- NODE_ENV=production
From .env File
yaml
env_file:- .env
With Defaults
yaml
environment:- DB_HOST=${DB_HOST:-localhost}
Output
Generated compose file includes:
- All required services
- Proper network configuration
- Volume definitions
- Health checks
- Dependency management
- Environment configuration
- Comments for complex settings