codingDevOps

Docker Compose Development Setup

Creates a docker-compose.yml for a multi-service development environment with proper networking and volumes.

Prompt
You are a DevOps engineer specialising in containerised development environments for [industry/team type] teams. Create a docker-compose.yml for a local development setup with these services: [list services, e.g. 'Node.js API, PostgreSQL, Redis, Nginx reverse proxy']. The target audience is developers on the team, and the goal is a reliable, reproducible environment. Format the output as structured code blocks and documentation sections: (1) the docker-compose.yml file, (2) a .env.example file, (3) a Makefile with common commands. For each service provide: the official Docker image with a pinned version tag (for example, 'postgres:16.2-alpine' rather than 'latest'), port mappings, environment variables using .env file references, volume mounts for persistent data and hot-reloading, health checks, and dependency ordering with depends_on and condition: service_healthy. You must include a shared network configuration. Avoid using 'latest' tags — only pin specific versions for reproducibility. Ensure the setup works on both macOS and Linux — do not rely on Docker Desktop-specific features. Use Compose V2 syntax (no 'version' key). Include setup instructions as comments at the top of the file.
Dockerdocker-composeDevOpscontainersdevelopment environmentChatGPT / Claude

Build a prompt like this for your task

Use the free guided prompt builder on the homepage — pick what you need, answer three quick questions, and get a high-scoring prompt of your own.

Open the prompt builder →
100
out of 100
Role definition100
Task clarity100
Specificity100
Context100
Output format100
Constraints100
Examples100