ソース情報
- リポジトリ
- 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コマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?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