create-docker-compose-dev
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "create-docker-compose-dev" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-c0464517587830454f3f4de1466fd3c901ad961e51a418268d586daf20eba838. Verify the upstream source and version against https://github.com/dykyi-roman/awesome-claude-code before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Create Docker Compose dev: generate a Docker Compose configuration for a PHP project for development, creating a complete development environment that includes database, cache, queue, and debugging tools.
Introduction source: third_party · dykyi-roman · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Generates Docker Compose development configurations for PHP projects. Creates full development stacks with database, cache, queue, and debugging tools.
- Software, accounts and paid services
- docker compose up -d --build docker compose exec php composer install docker compose exec php php bin/console doctrine:migrations:migrate
- Testing
- Not tested
Browse files
Frontmatter
name: create-docker-compose-dev
description: Generates Docker Compose development configurations for PHP projects. Creates full development stacks with database, cache, queue, and debugging tools.Docker Compose Development Generator
Generates complete Docker Compose development configurations for PHP projects with database, cache, queue, mail, and debugging services.
Generated Files
docker-compose.yml # Full development stack
.env.docker # Environment variables for Docker
Generation Instructions
- Analyze project: Read
composer.jsonfor database drivers, Redis, RabbitMQ, Elasticsearch; detect framework - Select services: PHP-FPM + Nginx (always), DB (MySQL/PostgreSQL), Redis, RabbitMQ (profiles), Mailhog (profiles)
- Generate: All services with health checks, networking, env vars, profiles for optional services
Docker Compose Development Stack
# docker-compose.yml
services:
php:
build:
context: .
dockerfile: Dockerfile.dev
args:
HOST_UID: ${HOST_UID:-1000}
HOST_GID: ${HOST_GID:-1000}
volumes:
- .:/app:cached
- vendor:/app/vendor
- composer-cache:/home/dev/.composer
environment:
APP_ENV: ${APP_ENV:-dev}
APP_DEBUG: ${APP_DEBUG:-1}
DATABASE_URL: "postgresql://${DB_USER:-app}:${DB_PASSWORD:-secret}@database:5432/${DB_NAME:-app_dev}?serverVersion=17"
REDIS_URL: "redis://redis:6379"
RABBITMQ_URL: "amqp://${RABBITMQ_USER:-guest}:${RABBITMQ_PASS:-guest}@rabbitmq:5672"
MAILER_DSN: "smtp://mailhog:1025"
PHP_IDE_CONFIG: "serverName=docker"
XDEBUG_MODE: ${XDEBUG_MODE:-debug,coverage}
XDEBUG_CONFIG: "client_host=host.docker.internal"
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
database:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "php-fpm-healthcheck || exit 1"]
interval: 10s
timeout: 5s
retries: 3
networks:
- app-network
nginx:
image: nginx:1.27-alpine
ports:
- "${NGINX_PORT:-8080}:80"
volumes:
- .:/app:cached
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
php:
condition: service_healthy
networks:
- app-network
database:
image: postgres:17-alpine
ports:
- "${DB_PORT:-5432}:5432"
environment:
POSTGRES_DB: ${DB_NAME:-app_dev}
POSTGRES_USER: ${DB_USER:-app}
POSTGRES_PASSWORD: ${DB_PASSWORD:-secret}
volumes:
- db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-app} -d ${DB_NAME:-app_dev}"]
interval: 5s
timeout: 5s
retries: 10
networks:
- app-network
redis:
image: redis:7-alpine
ports:
- "${REDIS_PORT:-6379}:6379"
command: redis-server --appendonly yes --maxmemory 128mb --maxmemory-policy allkeys-lru
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
networks:
- app-network
rabbitmq:
image: rabbitmq:3.13-management-alpine
profiles: ["queue"]
ports:
- "${RABBITMQ_PORT:-5672}:5672"
- "${RABBITMQ_MGMT_PORT:-15672}:15672"
environment:
RABBITMQ_DEFAULT_USER: ${RABBITMQ_USER:-guest}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_PASS:-guest}
volumes:
- rabbitmq-data:/var/lib/rabbitmq
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "check_running"]
interval: 10s
timeout: 10s
retries: 5
networks:
- app-network
mailhog:
image: mailhog/mailhog:latest
profiles: ["mail"]
ports:
- "${MAILHOG_SMTP_PORT:-1025}:1025"
- "${MAILHOG_UI_PORT:-8025}:8025"
networks:
- app-network
volumes:
db-data:
redis-data:
rabbitmq-data:
vendor:
composer-cache:
networks:
app-network:
driver: bridge
Nginx Configuration
# docker/nginx/default.conf
server {
listen 80;
server_name localhost;
root /app/public;
index index.php;
client_max_body_size 20M;
location / {
try_files $uri /index.php$is_args$args;
}
location ~ ^/index\.php(/|$) {
fastcgi_pass php:9000;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_read_timeout 300;
internal;
}
location ~ \.php$ { return 404; }
location = /ping { access_log off; return 200 "pong"; add_header Content-Type text/plain; }
location ~ /\. { deny all; access_log off; log_not_found off; }
}
Profile Usage
# Core services only (PHP, Nginx, DB, Redis)
docker compose up -d
# With RabbitMQ
docker compose --profile queue up -d
# With Mailhog
docker compose --profile mail up -d
# All services
docker compose --profile queue --profile mail up -d
Common Development Commands
# First-time setup
docker compose up -d --build
docker compose exec php composer install
docker compose exec php php bin/console doctrine:migrations:migrate
# Daily workflow
docker compose up -d
docker compose exec php vendor/bin/phpunit
docker compose exec php vendor/bin/phpstan analyse
# Cleanup
docker compose down
docker compose down -v # Also remove volumes
Additional Services
See references/service-templates.md for composable service blocks: MySQL, Elasticsearch, MinIO, phpMyAdmin, Adminer, Traefik.
Usage
Provide:
- Database type (PostgreSQL/MySQL)
- Required services (Redis, RabbitMQ, Mail)
- Framework (Symfony/Laravel)
- Custom ports (optional)
The generator will:
- Create docker-compose.yml with selected services
- Generate Nginx configuration
- Create .env.docker with all variables
- Add health checks and configure networking
Current listing version
0.0.1
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 为PHP项目生成完整的Docker Compose开发环境,包含数据库、缓存、队列、邮件和调试工具
- 支持多种服务配置和profile管理,满足不同开发场景需求
- 提供详细的Nginx配置和常用开发命令,实用性强
Areas to improve
-
Description in the wrong location Reported severity: Minor
顶层frontmatter中description为空,实际描述内容在skill_body内部
Recommendation: 将description内容移至顶层frontmatter中
Highlights
- 触发词覆盖PHP项目、Docker Compose、开发环境等核心概念
- 支持多种数据库和服务类型选择,触发条件合理
Highlights
- Phase/步骤清晰,包含项目分析、服务选择、配置生成等完整流程
- 提供完整的docker-compose.yml示例和Nginx配置
- 包含profile使用说明和常用开发命令,结构完整
Areas to improve
-
依赖文件说明不完整 Reported severity: Minor
配置中引用了Dockerfile.dev和docker/nginx/default.conf,但未说明这些文件需要用户自行创建
Recommendation: 明确说明需要用户准备的依赖文件或提供生成这些文件的指引
Highlights
- 所有服务都配置了健康检查,确保服务可用性
- 使用profiles管理可选服务,避免不必要的资源占用
- 环境变量配置完整,支持自定义端口和认证信息
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
docker compose up -d --build docker compose exec php composer install docker compose exec php php bin/console doctrine:migrations:migrate
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.