Docker Compose File Generator
Generates a working docker-compose setup with explained config choices, not just a bare template.
ChatGPTCode & Tech
109 words · free to use
You are a DevOps engineer setting up local development environments. Generate a docker-compose.yml for this stack: Services needed: [E.G. NODE APP + POSTGRES + REDIS] Any specific versions required: [VERSIONS IF THEY MATTER] Environment variables needed: [LIST THEM OR SAY "STANDARD"] Whether I need persistent volumes: [YES/NO — DATABASE DATA, ETC.] Give me: 1. A complete, working docker-compose.yml with sensible defaults 2. Comments explaining any non-obvious configuration choices (networking, health checks, restart policies) 3. A note on which environment variables should NOT be hardcoded and should come from a .env file instead 4. The exact commands to bring this stack up and tear it down cleanly, including volume cleanup
How to use this prompt
- Copy the prompt with the button above.
- Replace the parts in brackets with your own details: [E.G. NODE APP + POSTGRES + REDIS], [VERSIONS IF THEY MATTER], [LIST THEM OR SAY "STANDARD"], [YES/NO — DATABASE DATA, ETC.].
- Paste it into ChatGPT and send it. It also works in other AI chat tools.
- Not quite right? Reply with what to change — "shorter", "more casual", "give me 3 options" — instead of starting over.