Docker Compose
Define multi-container applications with proper dependency handling, networking, and volume management.
- License 许可
- MIT
- 所属仓库
- agisota/old-one
- 最近更新
- 2026-07-04
- Stars
- ★ 3
- Forks
- 1
01 前言 Front Matter
- name
- Docker Compose
- metadata
- { "clawdbot": { "os": [ "linux", "darwin", "win32" ], "emoji": "🐳", "requires": { "anyBins": [ "docker-compose", "docker" ] } } }
- description
- Define multi-container applications with proper dependency handling, networking, and volume management.
02 资源文件 2
- 参考文档_meta.json133 B
- 参考文档.clawhub/origin.json146 B
03 SKILL.md 正文
depends_on Ready Condition
depends_on:alone only waits for container start—service likely not ready yet- Add healthcheck + condition for actual readiness:
depends_on:
db:
condition: service_healthy
- Without healthcheck defined on target service,
service_healthyfails
Healthcheck start_period
healthcheck:
test: ["CMD", "pg_isready"]
start_period: 30s
start_period: initial grace period—health failures don't count during this time- Slow-starting services (databases, Java apps) need adequate start_period
- Without it, container marked unhealthy before it finishes initializing
Volume Destruction
docker compose downpreserves volumesdocker compose down -vDELETES ALL VOLUMES—data loss-voften added by habit from tutorials—catastrophic in production- Named volumes survive
down; anonymous volumes deleted ondown
Resource Limits in Development
deploy:
resources:
limits:
memory: 512M
- Set limits during development—catches memory issues early
- Unlimited container can consume all host memory—kills other processes
- Copy limits to production config—don't discover limits in prod
.dockerignore
- Without it:
node_modules,.git, secrets copied into image - Mirrors
.gitignoresyntax—create at same level as Dockerfile - Large build context = slow builds, large images, potential security issues
- At minimum:
.git,node_modules,.env,*.log, build artifacts
Override File Pattern
docker-compose.yml: base config that works everywheredocker-compose.override.yml: auto-loaded, development-specific (mounts, ports)- Production:
docker compose -f docker-compose.yml -f docker-compose.prod.yml up - Keep secrets and environment-specific config in override files, not base
Profiles for Optional Services
services:
mailhog:
profiles: [dev]
- Services with profiles don't start by default—cleaner
docker compose up - Enable with
--profile dev - Use for: test databases, debug tools, mock services, admin interfaces
Environment Variable Precedence
- Shell environment (highest)
.envfile in compose directoryenv_file:directiveenvironment:in compose file (lowest for that var)
.envmust be exactly.env—.env.localnot auto-loaded- Debug with
docker compose config—shows resolved values
04 同仓库更多 Skills
zoom-out
Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.
zeroize-audit
Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with assembly-level analysis, and control-flow verification. Use for auditing C/C++/Rust code handling secrets, keys, passwords, or other sensitive data.
yeet
Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).
yara-rule-authoring
Guides authoring of high-quality YARA-X detection rules for malware identification. Use when writing, reviewing, or optimizing YARA rules. Covers naming conventions, string selection, performance optimization, migration from legacy YARA, and false positive reduction. Triggers on: YARA, YARA-X, malware detection, threat hunting, IOC, signature, crx module, dex module.
x-twitter-growth
X/Twitter growth engine for building audience, crafting viral content, and analyzing engagement. Use when the user wants to grow on X/Twitter, write tweets or threads, analyze their X profile, research competitors on X, plan a posting strategy, or optimize engagement. Complements social-content (generic multi-platform) with X-specific depth: algorithm mechanics, thread engineering, reply strategy, profile optimization, and competitive intelligence via web search.
x-api
X/Twitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.