소스 정보
- 저장소
- tools-only/X-Skills
- 최근 소스 활동
- 2026년 2월 9일 04:32
- 감지된 SKILL.md 언어
- 영어
- 스타
- 7
- 포크
- 1
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tools-only/X-Skills --skill docker-compose-create명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Index of Build Systems Skills
Coordination patterns for distributed dataflow systems including barriers, epochs, and distributed snapshots
Windowing, sessionization, time-series aggregation, and late data handling for streaming systems
SOC 직업 분류 기준
SKILL.md 표시 중
| name | docker-compose-create |
| description | Generate docker-compose.yml for multi-service applications |
| shortcut | dcc |
| category | devops |
| difficulty | intermediate |
| estimated_time | 2 minutes |
Creates production-ready docker-compose.yml files for multi-service applications with proper networking, volumes, health checks, and environment management.
/dockerfile-generate instead)You are a Docker Compose expert. When user runs /docker-compose-create or /dcc:
Identify services: Ask user to specify:
Determine requirements:
Generate docker-compose.yml:
Create .env template:
Provide usage instructions:
# docker-compose.yml
[Complete compose file with comments]
# .env.example
[Environment variables template]
## Usage
### Start all services:
```bash
docker-compose up -d
docker-compose logs -f [service-name]
docker-compose down
docker-compose up -d --build
## Examples
### Example 1: Node.js API + PostgreSQL + Redis
**User:** `/dcc`
**Services specified:**
- Node.js API (port 3000)
- PostgreSQL database
- Redis cache
**Output:**
```yaml
# docker-compose.yml
version: '3.8'
services:
# Node.js API service
api:
build:
context: .
dockerfile: Dockerfile
container_name: api
restart: unless-stopped
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
- REDIS_URL=redis://redis:6379
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
networks:
- app-network
volumes:
- ./logs:/app/logs
# PostgreSQL database
db:
image: postgres:15-alpine
container_name: postgres-db
restart: unless-stopped
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- app-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
# Redis cache
redis:
image: redis:7-alpine
container_name: redis-cache
restart: unless-stopped
command: redis-server --requirepass ${REDIS_PASSWORD}
volumes:
- redis-data:/data
networks:
- app-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
# Named volumes for data persistence
volumes:
postgres-data:
driver: local
redis-data:
driver: local
# Custom network for service isolation
networks:
app-network:
driver: bridge
# .env.example
# Copy this file to .env and fill in your values
# PostgreSQL Configuration
POSTGRES_DB=myapp
POSTGRES_USER=postgres
POSTGRES_PASSWORD=your_secure_password_here
# Redis Configuration
REDIS_PASSWORD=your_redis_password_here
# Application Configuration
NODE_ENV=production
User: /dcc
Services specified:
Output:
# docker-compose.yml
version: '3.8'
services:
# React frontend
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: frontend
restart: unless-stopped
ports:
- "80:80"
environment:
- REACT_APP_API_URL=http://localhost:5000
depends_on:
- backend
networks:
- app-network
# Express backend
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: backend
restart: unless-stopped
ports:
- "5000:5000"
environment:
- NODE_ENV=production
- MONGODB_URI=mongodb://${MONGO_USER}:${MONGO_PASSWORD}@mongodb:27017/${MONGO_DB}?authSource=admin
- JWT_SECRET=${JWT_SECRET}
depends_on:
mongodb:
condition: service_healthy
# .env.example
# MongoDB Configuration
MONGO_USER=admin
MONGO_PASSWORD=your_secure_password_here
MONGO_DB=myapp
# Backend Configuration
JWT_SECRET=your_jwt_secret_here
NODE_ENV=production
# Frontend Configuration
REACT_APP_API_URL=http://localhost:5000
User: /dcc
Services specified:
Output:
# docker-compose.yml
version: '3.8'
services:
# Nginx API Gateway
gateway:
image: nginx:alpine
container_name: api-gateway
restart: unless-stopped
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- user-service
- product-service
- order-service
networks:
- app-network
# User Service
user-service:
build:
context: ./services/user-service
dockerfile: Dockerfile
container_name: user-service
restart: unless-stopped
environment:
- DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@db:5432/users
- SERVICE_PORT=3001
depends_on:
db:
condition: service_healthy
networks:
- app-network
# Product Service
[, ]
# .env.example
# Database Configuration
POSTGRES_PASSWORD=your_secure_password_here
Use health checks to ensure services start in correct order Named volumes persist data across container restarts Custom networks isolate services from other containers Always use .env files (never commit secrets) Service names become DNS hostnames (e.g., db, redis)
PostgreSQL:
db:
image: postgres:15-alpine
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
MySQL:
db:
image: mysql:8
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
volumes:
- mysql-data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
Redis:
redis:
image: redis:7-alpine
command: redis-server --requirepass ${REDIS_PASSWORD}
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
Issue: Services can't communicate
→ Ensure all services are on same network
→ Use service names as hostnames (e.g., http://backend:5000)
Issue: Data lost on restart → Verify named volumes are defined → Check volume mount paths match service defaults
Issue: Service starts before dependency ready
→ Add health checks to dependencies
→ Use condition: service_healthy in depends_on
Issue: Environment variables not loading → Create .env file from .env.example → Ensure .env is in same directory as docker-compose.yml