← back to flaviocopes.com

Docker Compose generator

← All tools

Pick your app, check the services it needs — Postgres, MySQL, Redis, Adminer — and get a complete compose.yaml with healthchecks, proper depends_on wiring, and named volumes.

~~~

App service

~~~

Add-on services

~~~

compose.yaml

Save it as compose.yaml next to your Dockerfile, then start everything with . The-d flag runs it in the background; follow logs withdocker compose logs -f and stop withdocker compose down (data in named volumes survives).

~~~

What each field does

~~~

About this tool

Docker Compose describes a multi-container setup in one YAML file: your app plus the databases and services it needs, wired together on a private network. One command brings the whole stack up in the same way on any machine.

The generated file uses the modern Compose spec — there's no top-levelversion: key anymore (Compose v2 ignores it and warns). Healthchecks plus condition: service_healthy make sure your app doesn't start before the database can actually accept connections, which is the most common source of flaky compose setups.

The app service builds from a local Dockerfile — you can generate one with the Dockerfile generator.

~~~

Read more