docker-compose
Define local and small-prod stacks with Docker Compose: minimal images, non-root, pinned digests, secret hygiene. Use when containerizing services or dependencies.
SKILL.mdskills/devops/docker-compose/SKILL.md
GitHubdocker-compose
One command to a working stack; production habits from the first file.
Inspection
Inventory services, dependency images + pins, env/secret wiring, volumes, networks, and healthcheck coverage.
Decision rules
One command to a working stack; pinned digests; env from files/vault never committed; healthchecks gating dependents.
Activate when
- Adding Dockerfiles, compose files, or local Postgres/Redis/queue dependencies.
Do NOT activate for
- Kubernetes or cloud-managed deploys (see cloud/aws-foundations).
Procedure
- Images: minimal base, pinned digest, non-root user, no secrets baked in;
.dockerignorepresent. - Compose: versioned services, healthchecks, named volumes, explicit networks; env from files/vault, never committed.
- Dependencies: Postgres/Redis as versioned services with seed + migrate steps documented.
- Security: apply the container checklist in
../../tooling/containers/: minimal images, non-root, pinned digests, secret hygiene. - Verify: cold
up --build, healthchecks green, app connects, teardown leaves no stray volumes.
References
- Related:
../../tooling/containers/,../../databases/postgres-operations/.
Failure modes
Floating tags; secrets committed in env files; no healthchecks so dependents race; volumes wiping data on recreate.
Escalation
Image hardening → tooling/containers; production orchestration → cloud/*.