Skip to content
Skills Library
DevOps & cloud · Learning & explanation

docker-compose-basics

/docker-compose-basics

Use when defining and running multi-container Docker applications with Docker Compose YAML configuration.

Repository
han ↗
Licence
Apache-2.0
Last repository change
08.09.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 08.09.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Use when defining and running multi-container Docker applications with Docker Compose YAML configuration.

Original author description

Use when defining and running multi-container Docker applications with Docker Compose YAML configuration.

How it works

  1. Basic Structure
  2. Common Commands
  3. Best Practices
Original SKILL.md headings · 104 lines, 162 words
SKILL.md preview
---
name: docker-compose-basics
user-invocable: false
description: Use when defining and running multi-container Docker applications with Docker Compose YAML configuration.
allowed-tools: []
---

# Docker Compose Basics

Docker Compose for defining and running multi-container applications.

## Basic Structure

```yaml
version: '3.8'

services:
  web:
    image: nginx:latest
    ports:
      - "80:80"
    volumes:
      - ./html:/usr/share/nginx/html
    environment:
      - NGINX_HOST=localhost
    depends_on:
      - api
      
  api:
    build: ./api
    ports:
      - "3000:3000"
    environment:
      DATABASE_URL: postgres://db:5432/myapp
    depends_on:
      - db
      
  db:
    image: postgres:15
    volumes:
      - pgdata:/var/lib/postgresql/data
    environment:
      POSTGRES_PASSWORD: secret
      POSTGRES_DB: myapp

volumes:
  pgdata:
```

## Common Commands

```bash
# Start services
docker compose up

# Start in background
docker compose up -d

# Stop services
docker compose down

# View logs
docker compose logs -f

# Rebuild
docker compose build

# Execute command
docker compose exec web sh

# Scale service
docker compose up -d --scale api=3
```

## Best Practices

### Environment Variables

```yaml
services:
  api:
    environment:
      - NODE_ENV=${NODE_ENV:-development}
      - API_KEY=${API_KEY}
```

### Health Checks

```yaml
services:
  web:
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost"]
      interval: 30s
      timeout: 10s
      retries: 3
```

### Resource Limits

```yaml
services:
  api:
    deploy:
      resources:
        limits:
          cpus: '0.5'
          memory: 512M
```

Versions

The database has no other skills named docker-compose-basics.

Database snapshot: 13.11.2026 · package version ce7a8544a33d (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100docker-compose-setup
    Set up and orchestrate multi-container Docker applications using docker-compose, including service configuration, networking, volumes, and environment management. Use when the user requests docker compose setup or provides relevant inputs for this workflow.
  • 100docker-compose-multi-container-orchestration
    Use this skill when defining multi-container development environments, networking, volumes, and health checks using Docker Compose.
  • 100docker-compose
    Define and run multi-container Docker applications using Docker Compose. Create compose files, manage service dependencies, configure networks and volumes, and orchestrate local development environments. Use when setting up multi-service applications or development environments.
  • 100docker-compose
    Use Docker Compose to define, run, debug, and harden multi-container applications. Load for compose.yaml design, networking, volumes, secrets, profiles, overrides, watch mode, lifecycle operations, or troubleshooting. Do not use this skill for unrelated requests; route to the…
  • 100docker-compose-creator
    Create docker compose creator operations. Auto-activating skill for DevOps Basics. Triggers on: docker compose creator, docker compose creator Part of the DevOps Basics skill category. Use when working with docker compose creator functionality. Trigger with phrases like "docker…
  • 100generating-docker-compose-files
    Execute use when you need to work with Docker Compose. This skill provides Docker Compose file generation with comprehensive guidance and automation. Trigger with phrases like "generate docker-compose", "create compose file", or "configure multi-container app".

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.