com um clique
docker-compose-generator
Generate docker-compose.yml files for local development with application services, databases, caches, and queues. Use when the user asks to set up a local dev environment or create docker-compose configuration.
Menu
Generate docker-compose.yml files for local development with application services, databases, caches, and queues. Use when the user asks to set up a local dev environment or create docker-compose configuration.
Generate a mock API server from OpenAPI specs, TypeScript interfaces, or endpoint descriptions for frontend development and testing. Use when the user asks to create a mock server, fake API, or stub endpoints.
Map and visualize module dependencies, detect circular imports, and identify coupling hotspots. Use when the user asks to analyze dependencies, find circular imports, or understand module relationships.
Generate typed error classes, error handling middleware, and HTTP error mapping following project conventions. Use when the user asks to set up error handling, create error classes, or implement error middleware.
Create, manage, and clean up feature flags for gradual rollouts and safe deployments. Use when the user asks to add a feature flag, toggle, or manage feature gating.
Generate OpenSearch Dashboards (Kibana) saved objects — index patterns, visualizations, and dashboards as JSON. Use when the user asks to create dashboards, charts, or visualizations for OpenSearch/Elasticsearch/Kibana.
Design and create automation workflows — shell scripts, Cursor hooks, GitHub Actions, cron jobs, and task runners. Use when the user asks to automate a process, create a script, or set up a workflow.
| name | docker-compose-generator |
| description | Generate docker-compose.yml files for local development with application services, databases, caches, and queues. Use when the user asks to set up a local dev environment or create docker-compose configuration. |
Generate a complete docker-compose.yml for local development with all required services, health checks, and networking.
When the user asks to create a docker-compose file, set up a local dev environment, or add services to an existing compose config.
| Service | Image | Default Port |
|---|---|---|
| PostgreSQL | postgres:16-alpine | 5432 |
| MySQL | mysql:8.0 | 3306 |
| MongoDB | mongo:7 | 27017 |
| Redis | redis:7-alpine | 6379 |
| OpenSearch | opensearchproject/opensearch:2 | 9200 |
| RabbitMQ | rabbitmq:3-management-alpine | 5672, 15672 |
| Kafka | confluentinc/cp-kafka:7.5.0 | 9092 |
| LocalStack | localstack/localstack:latest | 4566 |
| Mailhog | mailhog/mailhog | 1025, 8025 |
| MinIO | minio/minio | 9000, 9001 |
version: "3.9"
services:
app:
build:
context: .
dockerfile: Dockerfile
target: deps
volumes:
- .:/app
- /app/node_modules
ports:
- "${APP_PORT:-3000}:3000"
environment:
- NODE_ENV=development
- DB_HOST=postgres
- DB_PORT=5432
- DB_NAME=${DB_NAME:-myapp}
- DB_USERNAME=${DB_USERNAME:-postgres}
- DB_PASSWORD=${DB_PASSWORD:-postgres}
- REDIS_URL=redis://redis:6379
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
postgres:
image: postgres:16-alpine
ports:
- "${DB_PORT:-5432}:5432"
environment:
POSTGRES_DB: ${DB_NAME:-myapp}
POSTGRES_USER: ${DB_USERNAME:-postgres}
POSTGRES_PASSWORD: ${DB_PASSWORD:-postgres}
volumes:
- postgres_data:/var/lib/postgresql/data
- ./scripts/init-db.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
redis:
image: redis:7-alpine
ports:
- "${REDIS_PORT:-6379}:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
postgres_data:
driver: local
redis_data:
driver: local
networks:
default:
name: ${COMPOSE_PROJECT_NAME:-myapp}_network
docker-compose up -d wrapper with health check waiting# scripts/dev-setup.sh
#!/usr/bin/env bash
set -euo pipefail
echo "Starting services..."
docker compose up -d
echo "Waiting for database..."
until docker compose exec postgres pg_isready -U postgres; do
sleep 2
done
echo "Running migrations..."
npm run migrate
echo "Dev environment ready!"
# .env.docker (for docker-compose)
COMPOSE_PROJECT_NAME=myapp
APP_PORT=3000
DB_PORT=5432
DB_NAME=myapp
DB_USERNAME=postgres
DB_PASSWORD=postgres
REDIS_PORT=6379
node_modules
.git
.env
.env.*
dist
coverage
*.log
:latest except for dev-only tools)depends_on with condition: service_healthy for startup orderingrestart: unless-stopped for resilient local devComplete docker-compose.yml with all services, health checks, volumes, and helper scripts. Ready to run with docker compose up.
user: in the service or fix ownership