Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
pluginagentmarketplace avatar

Docker Compose Setup

  • 203 installs
  • 2 repo stars
  • Updated January 5, 2026
  • pluginagentmarketplace/custom-plugin-docker

Scaffold a production-oriented Docker Compose stack with healthchecks, restart policy, and bridged networking for a solo-shipped app.

About

docker-compose-setup is an agent skill for solo builders who need a sane default Docker Compose layout instead of copying fragile snippets from forums. It ships a version 3.8 production template: build context, published ports, NODE_ENV=production, HTTP healthchecks, restart policy, and an isolated bridge network. Configuration layers separate skill metadata, validation strictness, markdown output with examples, and environment-specific overrides so development stays permissive while production turns strict validation on. The packaged schema validates semver skill versions and structure for automation-friendly agents. Use it when you are containerizing a Node-style app for a single-host or small-team deploy path; extend services for databases and workers yourself. It complements—not replaces—full orchestration on Kubernetes or managed PaaS.

  • Production-oriented Compose 3.8 template with app service build and port publish
  • Healthcheck using curl against /health—30s interval, 10s timeout, 3 retries
  • restart: unless-stopped and dedicated app-network bridge driver
  • JSON Schema for skill version semver and environment overrides (dev vs production strict validation)
  • Integrations flags for git, linter, and formatter hooks

Docker Compose Setup by the numbers

  • 203 all-time installs (skills.sh)
  • +5 installs in the week ending Jul 26, 2026 (Skillselion tracking)
  • Ranked #400 of 1,453 DevOps & CI/CD skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Jul 26, 2026 (Skillselion catalog sync)
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-docker --skill docker-compose-setup

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs203
repo stars2
Security audit3 / 3 scanners passed
Last updatedJanuary 5, 2026
Repositorypluginagentmarketplace/custom-plugin-docker

What it does

Scaffold a production-oriented Docker Compose stack with healthchecks, restart policy, and bridged networking for a solo-shipped app.

Files

SKILL.mdMarkdownGitHub ↗

Docker Compose Setup Skill

Master Docker Compose for multi-container application orchestration with service dependencies, health checks, and environment management.

Purpose

Design and configure Docker Compose files for development and production environments with proper service orchestration.

Parameters

ParameterTypeRequiredDefaultDescription
servicesarrayNo-List of services to configure
environmentenumNodevdev/staging/prod
include_monitoringbooleanNofalseAdd monitoring services

Modern Compose File (2024-2025)

Note: The version field is deprecated. Start directly with services:.

services:
  frontend:
    build:
      context: ./frontend
      target: production
    ports:
      - "80:80"
    depends_on:
      backend:
        condition: service_healthy
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost/health"]
      interval: 30s
      timeout: 10s
      retries: 3
    restart: unless-stopped

  backend:
    build: ./backend
    expose:
      - "3000"
    environment:
      DATABASE_URL: postgres://user:${DB_PASSWORD}@database:5432/app
    depends_on:
      database:
        condition: service_healthy
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
      interval: 10s
      timeout: 5s
      retries: 5

  database:
    image: postgres:16-alpine
    volumes:
      - db_data:/var/lib/postgresql/data
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 5s
      timeout: 5s
      retries: 5

volumes:
  db_data:

Environment Management

Base + Override Pattern

# docker-compose.yaml (base)
services:
  app:
    image: myapp:latest

# docker-compose.override.yaml (dev - auto-loaded)
services:
  app:
    build: .
    volumes:
      - ./src:/app/src
    environment:
      - DEBUG=true

# docker-compose.prod.yaml (production)
services:
  app:
    deploy:
      replicas: 3
    restart: always
# Development (loads override automatically)
docker compose up

# Production
docker compose -f docker-compose.yaml -f docker-compose.prod.yaml up -d

Environment Variables

# .env file (auto-loaded)
DB_PASSWORD=secret123
APP_VERSION=1.2.3
# Using in compose
environment:
  - DB_PASSWORD=${DB_PASSWORD}
  - VERSION=${APP_VERSION:-latest}  # Default value

Service Profiles

services:
  app:
    image: myapp

  # Only with --profile debug
  debugger:
    image: debug-tools
    profiles:
      - debug

  # Only with --profile testing
  test-db:
    image: postgres:alpine
    profiles:
      - testing
docker compose up                     # app only
docker compose --profile debug up     # app + debugger

Common Commands

# Start services
docker compose up -d

# Rebuild and start
docker compose up -d --build

# View logs
docker compose logs -f backend

# Scale service
docker compose up -d --scale backend=3

# Stop and clean
docker compose down -v

# Validate config
docker compose config

Error Handling

Common Errors

ErrorCauseSolution
undefined serviceDependency missingDefine service
yaml syntax errorIndentationFix YAML
port already in usePort conflictChange port
healthcheck failingService not readyIncrease start_period

Fallback Strategy

1. Validate with docker compose config 2. Start services individually 3. Use --no-deps to skip dependencies

Troubleshooting

Debug Checklist

  • [ ] Valid YAML? docker compose config
  • [ ] Images available? docker compose pull
  • [ ] Dependencies healthy? Check healthchecks
  • [ ] Environment set? Check .env file

Health Check Debugging

# Check health status
docker inspect --format='{{json .State.Health}}' <container>

# View health logs
docker inspect --format='{{range .State.Health.Log}}{{.Output}}{{end}}' <container>

Usage

Skill("docker-compose-setup")

Related Skills

  • docker-networking
  • docker-volumes
  • docker-production

Related skills

FAQ

Is Docker Compose Setup safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

DevOps & CI/CDdeployinfra

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.