docker-compose-ops

Creates, validates, starts, and troubleshoots Docker Compose stacks with automatic host port allocation.

Updated Jun 28, 2026
One-click install
npx skills add https://github.com/jason23452/my-skill --skill docker-compose-ops-jason23452
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: docker-compose-ops
Source: https://github.com/jason23452/my-skill/tree/main/devops/docker-compose-ops
Command: npx skills add https://github.com/jason23452/my-skill --skill docker-compose-ops-jason23452

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Docker Compose work involves more than one file: service dependencies, environment variables, ports, volumes, networks, and logs all interact. This Skill provides a safe, systematic workflow for creating, validating, starting, and debugging Compose stacks without destroying user data or hijacking occupied ports. ## Core Features & Use Cases - Compose Discovery & Validation: Locates compose.yaml, compose.yml, docker-compose.yml, or README-documented startup commands, then runs docker compose config before any startup. - Safe Startup & Troubleshooting: Diagnoses exited, restarting, or unhealthy containers from the outside in—logs, ports, environment, networking, volumes, and builds—without deleting volumes or stopping unrelated processes. - Automatic Port Allocation: The bootstrap script probes the host, reserves available host-side ports across repos, and generates a minimal compose.yaml for frontend (Node), backend (Python/Postgres), or generic apps. - Use Case: Your backend container fails with "connection refused to localhost:5432". The Skill explains Compose service-name networking, fixes the DATABASE_URL to use db:5432, and verifies the stack with bounded log output. ## Quick Start Ask the assistant to start and verify the Docker Compose stack for this project, diagnosing any services that fail to become healthy.

Frequently Asked Questions about docker-compose-ops

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix docker compose port already allocated errors?▼

Change the host-side port mapping in your Compose file while keeping the container port stable, for example mapping an available host port to container port 8000. Do not stop unrelated processes; identify the occupant first and only act with user consent.

How do I troubleshoot a docker compose service that keeps restarting?▼

Diagnose from the outside in: check container state with docker compose ps, read bounded logs with --tail and --no-color, then inspect ports, environment variables, networking, volumes, and build freshness. Fix the first failing service before restarting the whole stack.

Why does my container get connection refused on localhost:5432?▼

Inside a Compose network, services must reach each other by service name, not localhost. Point the database URL at the db service hostname such as db:5432, and add a healthcheck so the app waits for Postgres readiness.

What should I do when docker-compose.yml does not exist?▼

Search for alternate filenames like compose.yaml, compose.yml, or docker-compose.yaml, and check README or scripts for documented startup commands. If none exist, report the missing Compose source and generate a minimal file only when requested.

Is it safe to delete Docker volumes when debugging Compose issues?▼

No. Named volumes hold persistent data such as database state, so deleting them requires explicit user consent. Treat volume removal as a last resort and explain the impact before rebuilding dependency caches or database storage.