My Tools Garage

Docker Compose Generator

Scaffold a docker-compose.yml with databases and cache.

in-browser

How to use

  1. 1 Name your application service and pick an image, or tick "build from local Dockerfile".
  2. 2 Optionally add a host:container port mapping.
  3. 3 Select the databases, cache or proxy your app depends on.
  4. 4 Toggle named volumes to persist database data between restarts.
  5. 5 Copy the generated docker-compose.yml into your project.

About Docker Compose Generator

The Docker Compose Generator scaffolds a working docker-compose.yml so you can stand up a local stack without remembering the exact YAML by heart.

Start by naming your application service and either point it at a published image or tell it to build from a local Dockerfile.

Add a host:container port mapping and the tool wires up the ports section for you.

The real time-saver is the managed dependencies.

Tick PostgreSQL, MySQL, MongoDB, Redis or an Nginx reverse proxy and each one is added as its own service with a sensible image tag, a restart policy, default environment variables and a published port.

The app service is automatically given a depends_on entry for everything you selected, so Compose starts them in the right order.

For the stateful databases you can opt in to named volumes, which keep your data between container restarts instead of losing it every time you run docker compose down.

The whole file is assembled in your browser with no account, upload or network call, so it is safe for private projects and works offline.

Treat the output as a starting point: the default passwords are placeholders you should change before anything leaves your machine, and you can layer on extra services or environment variables once you paste it into your repository.

FAQ

Are the generated passwords safe to use?

No. The environment values like "change_me" are placeholders to get you running locally. Replace them with real secrets before using the file anywhere beyond your own machine.

Does it support building from a Dockerfile?

Yes. Enable "build from local Dockerfile" and the app service uses "build: ." instead of pulling an image, expecting a Dockerfile in the same directory.

Will my data survive a restart?

Only if you enable named volumes. With volumes on, PostgreSQL, MySQL and MongoDB get a persistent named volume so data is kept across container restarts.