🚀

Docker Compose Development Environment

Create a Docker Compose setup for local development with all services

Intermediate🚀 DevOpsAll Models
prompt template
Create a Docker Compose development environment for my project.

**App:** [YOUR_FRAMEWORK — e.g., "Next.js"]
**Services needed:** [LIST_SERVICES — e.g., "PostgreSQL, Redis, MinIO (S3-compatible)"]
**Additional tools:** [e.g., "pgAdmin, Redis Commander, Mailhog"]

Generate:
1. **docker-compose.yml** with all services configured
2. **Dockerfile** for the app (multi-stage: dev and prod)
3. **.dockerignore** with proper exclusions
4. **Environment files** (.env.example with all variables documented)

Requirements:
- Hot reload for the app (mount source code as volume)
- Persistent data volumes for databases
- Health checks for all services
- Proper networking (services can reach each other by name)
- Port mappings that avoid conflicts with common local services
- Seed script that runs on first startup

Include a Makefile or npm scripts with common commands:
- `make up` / `make down` — start/stop everything
- `make logs` — tail all logs
- `make db-reset` — drop and recreate database with seeds
- `make shell` — open a shell in the app container

How to Use This Prompt

  1. 1Copy the prompt template above
  2. 2Paste into Claude, ChatGPT, or Cursor
  3. 3Replace [bracketed placeholders] with your specific project details
  4. 4Iterate on the AI output to refine and customize the results