docker-compose
यह क्या करती है
Docker Compose कई programs (services) को एक साथ चलाने में मदद करता है जिन्हें मिलकर काम करना होता है। यह एक text file का इस्तेमाल करता है जिसमें सभी programs और उनके जुड़ने का तरीका लिखा होता है, इससे जटिल applications चलाना आसान हो जाता है।
कब इस्तेमाल करें
- ✓जब आपके कई programs साथ मिलकर काम करते हों (जैसे database वाली वेबसाइट)।
- ✓production जैसा ही testing environment बनाने के लिए।
- ✓टीम के हर सदस्य के एक जैसे configuration इस्तेमाल करने के लिए।
Skill का लिंक
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/docker-compose/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“Docker Compose का इस्तेमाल करके एक वेबसाइट और एक database वाला environment सेट करो।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
आप 'docker-compose.yml' नाम की file लिखते हैं जिसमें हर program (service), वह कौन सा image इस्तेमाल करता है, किन ports की ज़रूरत है, और वह दूसरे programs से कैसे जुड़ता है, यह बताया जाता है। फिर एक simple command से सब कुछ शुरू हो जाता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Docker Compose
Orchestrate multi-container applications with declarative YAML configuration.
When to Use This Skill
Use this skill when:
- Running multi-container applications locally
- Setting up development environments
- Defining service dependencies and networking
- Managing application stacks with multiple services
- Creating reproducible development setups
Execution Scope
Confirm the selected Docker context and project before any operation. Build instructions execute contributed commands; inspect the Dockerfile, build context, scripts and downloaded dependencies first. Image publication, shared-container stops and volume deletion need authorization for the exact target. Do not expose environment values, image history or logs containing credentials. These examples are independent fragments with project-specific assets, not a complete deployment.
Prerequisites
- Docker Engine with Compose plugin (v2)
- Basic Docker knowledge
- YAML syntax understanding
Basic Configuration
Simple Application Stack
# docker-compose.yml
services:
web:
build: .
ports:
- "127.0.0.1:3000:3000"
environment:
- NODE_ENV=development
- DATABASE_URL=postgres://postgres:${POSTGRES_PASSWORD:?set a local fixture password}@db:5432/myapp
depends_on:
- db
- redis
db:
image: postgres:15-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?set a local fixture password}
POSTGRES_DB: myapp
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- "127.0.0.1:5432:5432"
redis:
image: redis:7-alpine
ports:
- "127.0.0.1:6379:6379"
volumes:
postgres-data:
Service Configuration
Build Options
services:
app:
build:
context: ./app
dockerfile: Dockerfile.dev
args:
NODE_VERSION: "20"
target: development
cache_from:
- myapp:cache
image: myapp:dev
Environment Variables
services:
app:
environment:
- NODE_ENV=production
- API_KEY=${API_KEY} # From shell or .env file
env_file:
- .env
- .env.local
Port Mapping
services:
web:
ports:
- "127.0.0.1:3000:3000" # HOST:CONTAINER
- "127.0.0.1:9229:9229" # Bind to localhost only
- "8080-8090:8080-8090" # Port range
expose:
- "3000" # Internal only (no host binding)
Volume Mounts
services:
app:
volumes:
# Named volume
- app-data:/app/data
# Bind mount
- ./src:/app/src
# Read-only bind mount
- ./config:/app/config:ro
# Anonymous volume (for node_modules)
- /app/node_modules
volumes:
app-data:
driver: local
Dependencies
services:
web:
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
db:
image: postgres:15
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
Networking
Custom Networks
services:
frontend:
networks:
- frontend-net
backend:
networks:
- frontend-net
- backend-net
db:
networks:
- backend-net
networks:
frontend-net:
driver: bridge
backend-net:
driver: bridge
internal: true # No external access
Network Aliases
services:
db:
networks:
backend:
aliases:
- database
- postgres
networks:
backend:
Resource Limits
services:
app:
deploy:
resources:
limits:
cpus: '2'
memory: 1G
reservations:
cpus: '0.5'
memory: 256M
Multiple Compose Files
Override Files
# docker-compose.yml (base)
services:
web:
image: myapp:latest
ports:
- "127.0.0.1:3000:3000"
# docker-compose.override.yml (development - auto-loaded)
services:
web:
build: .
volumes:
- ./src:/app/src
environment:
- DEBUG=true
# docker-compose.prod.yml (production)
services:
web:
deploy:
replicas: 3
environment:
- DEBUG=false
Using Multiple Files
# Development (uses override automatically)
docker compose up
# Production
docker compose -f docker-compose.yml -f docker-compose.prod.yml up
# Merge and view final config
…
अक्सर पूछे जाने वाले सवाल
Docker Compose में 'services' क्या हैं?
Services आपके application के अलग-अलग programs या हिस्से हैं जिन्हें साथ चलना होता है, जैसे web server, database या cache।
'volume' क्या है?
Volume वह जगह है जहाँ application का ज़रूरी data सेव रहता है, भले ही program restart हो या हटा दिया जाए। यह programs के लिए hard drive की तरह है।
क्या मैं Docker Compose से अपनी application इंटरनेट पर चला सकता हूँ?
Docker Compose अपने computer या आपके द्वारा मैनेज किए गए server पर application चलाने के लिए बढ़िया है। इंटरनेट पर बड़े पैमाने पर चलाने के लिए दूसरे tools ज़्यादा सही हो सकते हैं, पर शुरुआत के लिए Compose एक बढ़िया विकल्प है।
जानकारी
लेखक का मूल विवरण
Define and run multi-container Docker applications using Docker Compose.
लोकप्रियता
- GitHub स्टार
- 48k
- रैंकिंग में स्थान
- #4474
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
00-andruia-consultant
48kआपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।
007
48kआपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।
10-andruia-skill-smith
48kआपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।
20-andruia-niche-intelligence
48kआपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।
मिलती-जुलती skills
openclaw-update
394kयह आपके एजेंट को चल रहे OpenClaw Gateway को अपडेट करने में मदद करती है, इंस्टॉल के तरीके के अनुसार सही विधि चुनकर और सेशन बनाए रखकर।
diagnose-gateway
394kयह आपके एजेंट को सेटिंग्स, चैनल और पोर्ट जांचकर पता लगाने देती है कि OpenClaw Gateway क्यों फ़ेल हो रहा है, बिना कुछ बदले।
crabbox-apps
394kयह आपके एजेंट को किसी अस्थायी क्लाउड मशीन पर ऐप खोलने और चलाने देती है, फिर उसका व्यू आपके चैट के साइड पैनल में दिखाती है।