1.2 KiB
1.2 KiB
Docker Compose Stack Skill
Use this skill when adding, reviewing, or modifying regular Docker Compose stacks in this repository.
Workflow
- Confirm the service belongs in the non-Swarm Compose repo.
- Create or update
<service>-compose.yml. - Create or update
<service>.env.examplewith placeholders only. - Keep real secrets out of the repo.
- Include healthchecks when practical.
- Use configurable paths and document required host directories.
- Validate with
docker compose configwhen Docker is available. - Summarize changed files and any manual setup steps.
Compose Standards
- Use 2-space YAML indentation.
- Prefer explicit image tags over unpinned
latestwhen stability matters. - Use
restart: unless-stoppedfor ordinary long-running services unless there is a reason not to. - Put service-specific networks at the bottom of the file.
- Avoid hardcoding passwords, domains, tokens, or private IP assumptions unless they are already public repo conventions.
- For reverse proxy routing, add comments instead of assuming a specific proxy unless the user provides details.
Validation Command Pattern
docker compose --env-file <service>.env.example -f <service>-compose.yml config