Docker Compose generator
Describe your services and get a valid compose.yaml for Docker Compose. Start from presets such as PostgreSQL, MySQL, MariaDB, MongoDB, Redis, Nginx, a Node.js or Python app, WordPress or Adminer, then change images, ports, environment variables, volumes, dependencies, restart policies, commands and health checks. The YAML is generated by a proper YAML library, so quoting is always right, named volumes are declared automatically, and the checker warns about invalid names and ports, two services using the same host port, dependencies on services that don’t exist and placeholder passwords left from a preset.
- Warning“db” still has the placeholder password; change it.
How to use the Docker Compose Generator
- 1
Add services
From a preset or empty.
- 2
Fill in the details
Image or build context, ports, environment, volumes and dependencies.
- 3
Fix warnings and download
Save compose.yaml and run docker compose up.
When to use it
- Set up a local development stack quickly.
- Learn the Compose file structure.
- Prepare a small self-hosted deployment.
Limits
- Covers the common service options; networks, secrets, configs and deploy settings need editing by hand.
- Image tags in presets are examples; pin the versions you have tested.
Privacy
Generated in your browser. Passwords you type are not sent anywhere.
Frequently asked questions
Should I keep passwords in the compose file?
For local development it is common. For servers, use an .env file or Docker secrets and never commit real passwords to a repository.
Why are ports quoted?
Some YAML parsers read unquoted values like 22:22 as numbers in base 60. Quoting port mappings avoids that.
What is the difference between a named volume and a bind mount?
A named volume (db-data:/var/lib/…) is managed by Docker. A bind mount (./site:/usr/share/…) maps a folder from your machine.
Does depends_on wait until a database is ready?
Only until its container starts. Add a health check and use “condition: service_healthy” if your app needs the database to accept connections first.
Do I still need a version: line?
No. The current Compose Specification ignores it, so it is not generated.
Related tools
People also use
- JWT Generator & SignerCreate and sign JSON Web Tokens with HMAC, RSA or ECDSA keys, entirely in your browser.
- Base64 Encoder & DecoderEncode and decode Base64 and Base64url, text or files.
- URL Encoder & DecoderPercent-encode or decode URLs and see their query parameters.
- CSV to JSON ConverterConvert CSV ⇄ JSON with correct quoting, types and nested data.
Last updated November 24, 2026 · How we build and test our tools