compose
Generate Compose configs with services, networking, volumes, and health checks
What this skill does
# 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.md` for structure
- `04-networking.md` for networks
- `05-databases.md` for database services
- `06-services.md` for dependencies
- `08-volumes.md` for persistence
### 3. Generate Configuration
Create compose file following best practices:
```yaml
# Modern compose (no version field)
services:
app:
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
ports:
- "3000:3000"
environment:
- NODE_ENV=production
depends_on:
db:
condition: service_healthy
networks:
- frontend
- backend
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 30s
timeout: 10s
retries: 3
db:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- backend
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER}"]
interval: 10s
timeout: 5s
retries: 5
volumes:
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: ./api
expose:
- "3000"
environment:
- DATABASE_URL=postgresql://user:pass@db:5432/app
depends_on:
db:
condition: service_healthy
```
### Database Service
```yaml
services:
db:
image: postgres:16-alpine
volumes:
- db_data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
retries: 5
```
### Cache Service
```yaml
services:
redis:
image: redis:7-alpine
command: redis-server --appendonly yes
volumes:
- redis_data:/data
```
### Background Worker
```yaml
services:
worker:
build: .
command: npm run worker
depends_on:
- db
- redis
```
## Network Patterns
### Internal Database Network
```yaml
networks:
backend:
internal: true # No external access
```
### External Shared Network
```yaml
networks:
proxy:
external: true
name: 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
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.