What this prompt does
This prompt builds a complete docker-compose.yml for local development of your [project_type] application, wiring the services in [services] so a new project comes up with a single command. The application service mounts source code as a volume for hot reloading, exposes port [app_port], and configures environment variables via [env_strategy], so day-one onboarding is fast instead of a scavenger hunt.
The structure works because it brings the whole stack up together and keeps every piece healthy. The [database] service gets a persistent volume, initialization scripts for schema and seed data, and a health check that waits until the database accepts connections. The [cache] service uses [cache] with appropriate memory limits and an eviction policy. It adds [auxiliary_services] with proper networking and dependency ordering via depends_on using health-check conditions, a shared network with DNS resolution between services, named volumes for persistent data and package caches, and profiles so optional services like monitoring and email testing only start when explicitly requested. It also includes a Makefile or shell script with common commands such as start, stop, logs, shell, reset-db, and seed. Keeping optional services behind profiles is what keeps day-to-day work fast while the extras stay one command away.
When to use it
- You want a new project to come up with one command for fast onboarding.
- You need a local database with persistent data, schema, and seed scripts.
- You want hot reloading via a mounted source volume.
- You need auxiliary services like mail testing or DB admin without slowing daily work.
- You want health-check-based startup ordering so services wait for their dependencies.
- You want common operations wrapped in a Makefile or shell script.
Example output
Expect a ready-to-run local environment, not a fragment. You get a docker-compose.yml with an app service that has a source volume and port [app_port], a [database] service with a persistent volume, init scripts, and a connection health check, a [cache] service with memory limits and eviction, and the [auxiliary_services] placed behind profiles. It also defines a shared network, named volumes for data and package caches, and a Makefile with start, stop, logs, shell, reset-db, and seed targets, so the whole stack is reproducible for the next developer who clones the repo.
Pro tips
- List exactly what you need in
[services], since an unused service in the compose file just slows startup for everyone. - Use
[env_strategy]with an env_file plus docker-specific overrides so secrets stay out of the compose file itself. - Keep optional tooling behind profiles so everyday work stays fast and monitoring or mail testing start only when requested.
- Give the
[database]a real connection health check so dependent services wait instead of crashing against a cold database. - Use named volumes for package caches so installs do not re-download on every rebuild and onboarding stays quick.
- Keep the Makefile commands like reset-db and seed, since they are what make the environment reproducible for the next developer.