agentleFS
agentsdanceagentsdance/agentskills/skills/docker-compose-builder/SKILL.md

docker-compose-builder

Skill3 starsChanged 11 months agoApache-2.0View on GitHub

Create Docker Compose configurations for multi-container applications. Use when the user needs to orchestrate multiple services, set up development environments, or configure container networking.

  • Reads credentials

The file

Files
SKILL.md

Docker Compose Builder

Configure multi-container applications with Docker Compose.

Full Stack Application

version: '3.8'

services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "3000:3000"
    environment:
      - DATABASE_URL=postgres://user:pass@db:5432/myapp
      - REDIS_URL=redis://redis:6379
    depends_on:
      db:
        condition: service_healthy
      redis:
        condition: service_started
    volumes:
      - .:/app
      - /app/node_modules
    restart: unless-stopped

  db:
    image: postgres:15-alpine
    environment:
      POSTGRES_USER: user
      POSTGRES_PASSWORD: pass
      POSTGRES_DB: myapp
    volumes:
      - postgres_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U user -d myapp"]
      interval: 5s
      timeout: 5s
      retries: 5

  redis:
    image: redis:7-alpine
    volumes:
      - redis_data:/data
    command: redis-server --appendonly yes

  nginx:
    image: nginx:alpine
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
      - ./certs:/etc/nginx/certs:ro
    depends_on:
      - app

volumes:
  postgres_data:
  redis_data:

Development Override

# docker-compose.override.yml
version: '3.8'

services:
  app:
    build:
      target: development
    volumes:
      - .:/app
    environment:
      - DEBUG=true
    command: npm run dev

Common Commands

docker compose up -d              # Start in background
docker compose down               # Stop and remove
docker compose logs -f app        # Follow logs
docker compose exec app sh        # Shell into container
docker compose build --no-cache   # Rebuild images

Environment Variables

services:
  app:
    env_file:
      - .env
    environment:
      - NODE_ENV=production

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.