Docker Compose File Generator

Generates a working docker-compose setup with explained config choices, not just a bare template.

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
dockerdevopsinfrastructure

How to use this prompt

  1. Copy the prompt with the button above.
  2. 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.].
  3. Paste it into ChatGPT and send it. It also works in other AI chat tools.
  4. Not quite right? Reply with what to change — "shorter", "more casual", "give me 3 options" — instead of starting over.

Related code & tech prompts

See all 183 Code & Tech prompts →

Get 10 new prompts every week

Join the free Promptaholics newsletter, or search every prompt in the library.

We use cookies for analytics and ads. See our Privacy Policy.