docker-compose
Skill15 starsChanged 7 months agoMITView on GitHub
Multi-container Docker applications with docker-compose — define services, networks, volumes, and orchestrate local development environments
- Reads credentials
10 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- rafaelob/pragmatic-agent-skillstheir own version, first seen Nov 26, 2026
- jholhewres/devclaw-skillstheir own version, first seen Oct 9, 2026
- gordonmurray/data-engineering-skillstheir own version, first seen Jul 29, 2026
- magnus919/agent-skillstheir own version, first seen Jul 21, 2026
- kimtth/agent-skill-100-lines-or-lesstheir own version, first seen Jun 26, 2026
- aborroy/aiup-alfrescotheir own version, first seen Jun 22, 2026
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- JohnJBoren/claude-skills-ecosystem★ 212% same
Wrote their own version · 9
- magnus919/agent-skills★ 197same name
- gordonmurray/data-engineering-skills★ 47same name
- rafaelob/pragmatic-agent-skills★ 24same name
- aborroy/aiup-alfresco★ 14same name
- jholhewres/devclaw-skills★ 4same name
- kimtth/agent-skill-100-lines-or-less★ 2same name
- brpaz/agent-skills★ 1same name
- harrissohail6/claude-code-config★ 1same name
- nbsp1221/agent-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository143 other files it gives its agents.
- api-and-interface-designSkill
- browser-testing-with-devtoolsSkill
- ci-cd-and-automationSkill
- code-review-and-qualitySkill
- code-simplificationSkill
- context-engineeringSkill
- debugging-and-error-recoverySkill
- deprecation-and-migrationSkill
- documentation-and-adrsSkill
- doubt-driven-developmentSkill
- frontend-ui-engineeringSkill
- git-workflow-and-versioningSkill
- idea-refineSkill
- incremental-implementationSkill
- performance-optimizationSkill
- planning-and-task-breakdownSkill
- security-and-hardeningSkill
- shipping-and-launchSkill
- source-driven-developmentSkill
- spec-driven-developmentSkill
- addyosmani-tddSkill
- using-agent-skillsSkill
- apple-notesSkill
- apple-remindersSkill
- findmySkill
- imessageSkill
- claude-codeSkill
- codexSkill
- hermes-agentSkill
- opencodeSkill
- architecture-diagramSkill
- ascii-artSkill
- ascii-videoSkill
- baoyu-comicSkill
- baoyu-infographicSkill
- claude-designSkill
- comfyuiSkill
- creative-ideationSkill
- design-mdSkill
- drawio-headlessSkill
- excalidrawSkill
- humanizerSkill
- manim-videoSkill
- p5jsSkill
- pixel-artSkill
- popular-web-designsSkill
- pretextSkill
- sketchSkill
- social-media-slideshow-videoSkill
- songwriting-and-ai-musicSkill
- touchdesigner-mcpSkill
- visual-assets-generationSkill
- jupyter-live-kernelSkill
- api-monitoring-botsSkill
- cloud-browser-automationSkill
- kanban-orchestratorSkill
- kanban-workerSkill
- tinyfish-integrationSkill
- vps-cleanupSkill
- vps-security-hardeningSkill
- The first 60 shown.
The file
Files
Docker Compose — Multi-Container Orchestration
Manage multi-container Docker applications with docker-compose. Define services, networks, volumes, and dependencies in YAML. Perfect for local development, testing, and simple production deployments.
When to Use
- Setting up local development environments
- Running multi-service applications (app + database + cache)
- Testing microservices locally
- CI/CD pipeline containers
- Simple production deployments
Core Concepts
Services
services:
app:
build: .
ports:
- "3000:3000"
depends_on:
- db
db:
image: postgres:15
environment:
POSTGRES_PASSWORD: secret
volumes:
- db-data:/var/lib/postgresql/data
volumes:
db-data:Networks
networks:
frontend:
backend:
services:
app:
networks:
- frontend
- backend
db:
networks:
- backendCommon Patterns
1. Full-Stack App (Frontend + Backend + Database)
version: '3.8'
services:
frontend:
build: ./frontend
ports:
- "3000:3000"
environment:
- REACT_APP_API_URL=http://localhost:8000
depends_on:
- backend
backend:
build: ./backend
ports:
- "8000:8000"
environment:
- DATABASE_URL=postgresql://user:pass@db:5432/myapp
depends_on:
- db
db:
image: postgres:15
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=pass
- POSTGRES_DB=myapp
volumes:
- postgres-data:/var/lib/postgresql/data
volumes:
postgres-data:2. Microservices with Redis Cache
services:
api:
build: ./api
ports:
- "8000:8000"
environment:
- REDIS_URL=redis://cache:6379
depends_on:
- cache
- db
worker:
build: ./worker
environment:
- REDIS_URL=redis://cache:6379
depends_on:
- cache
cache:
image: redis:7-alpine
ports:
- "6379:6379"
db:
image: postgres:15
environment:
- POSTGRES_PASSWORD=secret
volumes:
- db-data:/var/lib/postgresql/data
volumes:
db-data:3. Development with Hot Reload
services:
app:
build:
context: .
target: development
volumes:
- .:/app
- /app/node_modules
ports:
- "3000:3000"
environment:
- NODE_ENV=development
command: npm run devEssential Commands
# Start all services
docker-compose up
# Start in background
docker-compose up -d
# Build and start
docker-compose up --build
# Stop all services
docker-compose down
# Stop and remove volumes
docker-compose down -v
# View logs
docker-compose logs -f
# View logs for specific service
docker-compose logs -f app
# Execute command in service
docker-compose exec app sh
# Scale service
docker-compose up -d --scale worker=3
# Restart service
docker-compose restart app
# View running services
docker-compose psBest Practices
1. Use .env Files
# .env
POSTGRES_PASSWORD=secret
API_PORT=8000# docker-compose.yml
services:
db:
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
api:
ports:
- "${API_PORT}:8000"2. Health Checks
services:
app:
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s3. Resource Limits
services:
app:
deploy:
resources:
limits:
cpus: '0.5'
memory: 512M
reservations:
cpus: '0.25'
memory: 256M4. Named Volumes for Persistence
volumes:
postgres-data:
driver: local
redis-data:
driver: local5. Separate Dev/Prod Configs
# Development
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up
# Production
docker-compose -f docker-compose.yml -f docker-compose.prod.yml upTroubleshooting
Port Already in Use
# Find process using port
lsof -i :3000
# Change port in docker-compose.yml
ports:
- "3001:3000"Container Won't Start
# Check logs
docker-compose logs app
# Check service status
docker-compose ps
# Rebuild without cache
docker-compose build --no-cache appDatabase Connection Issues
# Ensure depends_on is set
depends_on:
- db
# Use service name as hostname
DATABASE_URL=postgresql://user:pass@db:5432/myapp
# Wait for database to be ready (use wait-for-it.sh or healthcheck)Volume Permission Issues
# Set user in Dockerfile
USER node
# Or in docker-compose.yml
user: "1000:1000"Production Considerations
1. Use Specific Image Tags
# ❌ Don't use latest
image: postgres:latest
# ✅ Use specific version
image: postgres:15.3-alpine2. Secrets Management
# Use Docker secrets (Swarm mode)
secrets:
db_password:
file: ./secrets/db_password.txt
services:
db:
secrets:
- db_password3. Logging
services:
app:
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"4. Restart Policies
services:
app:
restart: unless-stoppedIntegration with CI/CD
# .github/workflows/test.yml
- name: Run tests
run: |
docker-compose -f docker-compose.test.yml up --abort-on-container-exit
docker-compose -f docker-compose.test.yml down -vCommon Stacks
MERN Stack
services:
frontend:
build: ./frontend
ports:
- "3000:3000"
backend:
build: ./backend
ports:
- "5000:5000"
mongo:
image: mongo:6
volumes:
- mongo-data:/data/dbDjango + PostgreSQL + Redis
services:
web:
build: .
command: python manage.py runserver 0.0.0.0:8000
ports:
- "8000:8000"
depends_on:
- db
- redis
db:
image: postgres:15
redis:
image: redis:7-alpine
celery:
build: .
command: celery -A myapp worker -l info
depends_on:
- redisReferences
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

