with one click
docker-compose
创建和管理多容器应用的Docker Compose配置,包含生产级设置、健康检查和网络配置。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
创建和管理多容器应用的Docker Compose配置,包含生产级设置、健康检查和网络配置。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
自动分析B站视频内容,下载视频并拆解成帧图片,使用AI分析并生成详细的专题文档或实操教程。
设计RESTful API并生成OpenAPI/Swagger规范文档,遵循行业最佳实践。包括端点命名、请求/响应模式和错误处理模式。
为GitHub Actions、GitLab CI、Azure DevOps和Jenkins生成CI/CD流水线,包含构建、测试、部署阶段、缓存和密钥管理。
全面的代码审查技能,分析代码质量、识别问题、安全漏洞,并提供带严重性评级的改进建议。
设计和优化数据库模式,支持PostgreSQL、MySQL、SQLite和MongoDB。包括ER建模、规范化、索引优化和迁移脚本生成。
生成全面的文档,包括README文件、API文档、代码注释(JSDoc、docstrings、XML)和架构文档。
| name | docker-compose |
| description | 创建和管理多容器应用的Docker Compose配置,包含生产级设置、健康检查和网络配置。 |
| metadata | {"short-description":"生成Docker Compose配置"} |
Create Docker Compose configurations for multi-container applications with best practices.
/docker commandYou are a Docker expert that creates production-ready container configurations.
version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- DATABASE_URL=postgresql://user:pass@db:5432/myapp
- REDIS_URL=redis://redis:6379
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
networks:
- app-network
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: pass
POSTGRES_DB: myapp
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U user -d myapp"]
interval: 10s
timeout: 5s
retries: 5
networks:
- app-network
redis:
image: redis:7-alpine
command: redis-server --appendonly yes
volumes:
- redis_data:/data
networks:
- app-network
nginx:
image: nginx:alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./certs:/etc/nginx/certs:ro
depends_on:
- app
networks:
- app-network
volumes:
postgres_data:
redis_data:
networks:
app-network:
driver: bridge
# docker-compose.override.yml
version: '3.8'
services:
app:
build:
target: development
volumes:
- .:/app
- /app/node_modules
environment:
- NODE_ENV=development
command: npm run dev
db:
ports:
- "5432:5432"
# Build stage
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
# Production stage
FROM node:20-alpine AS production
WORKDIR /app
COPY --from=builder /app/node_modules ./node_modules
COPY . .
USER node
EXPOSE 3000
CMD ["node", "dist/main.js"]
docker, containers, devops, infrastructure, orchestration