EN
My tools

Docker Compose Generator (compose.yaml)

Build a compose.yaml from templates: your app, nginx, PostgreSQL, MySQL, MariaDB, MongoDB, Redis, WordPress, Adminer or phpMyAdmin, with healthchecks and a .env file.

Lower-case letters, digits, - and _. Used as the compose project name.
My tools →
Advertisement

Docker Compose describes a multi-container application — your app, its database, a cache, a reverse proxy — in one compose.yaml file, so the whole stack starts with docker compose up. This generator writes that file from tested templates: PostgreSQL, MySQL, MariaDB or MongoDB with persistent named volumes, Redis, nginx, WordPress, Adminer and phpMyAdmin, with healthchecks so your app starts only when the database is ready, and a matching .env file for the secrets.

How to use this tool

  1. Name the project and say whether Compose should build your app from its Dockerfile.
  2. Pick a database, Redis, a web server and an admin UI as needed.
  3. Keep healthchecks on so start-up order is reliable.
  4. Save compose.yaml and .env side by side, set real passwords, then run docker compose up -d.

Formula

compose.yaml = name + services (image or build, ports, environment, volumes, healthcheck, depends_on) + volumes

Secrets are referenced as ${DB_PASSWORD} and filled from .env, which Compose reads automatically; $$ escapes a dollar sign that the container (not Compose) should expand, as in the PostgreSQL healthcheck. Ports in quotes avoid YAML reading 22:22 style values as numbers. Database ports are not published unless you ask, and then only on 127.0.0.1.

Example

The defaults — an app built from your Dockerfile, PostgreSQL 17 and Redis — give three services. The app gets DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@db:5432/${DB_NAME} and REDIS_URL=redis://redis:6379, and waits with condition: service_healthy until pg_isready and redis-cli ping succeed; data lives in the named volumes db-data and redis-data.

Frequently asked questions

docker-compose.yml or compose.yaml?

Compose V2 prefers compose.yaml but still reads docker-compose.yml. The old top-level "version:" key is obsolete and is left out.

Why is my database port not reachable from my computer?

Services talk to each other by name (db:5432) on the project network, so the database does not need a published port. Tick the option to publish it on 127.0.0.1 if you want to connect a local client.

I have a docker run command. Can I convert it?

Yes — use the Docker run to Docker Compose converter, which reads ports, volumes, environment and other flags from the command.

Sources

Last updated:

Cite or embed this tool
APA

kakaoCalc. (2026, November 8). Docker Compose Generator (compose.yaml). https://kakao.mobile/tools/docker-compose-generator/

MLA

“Docker Compose Generator (compose.yaml).” kakaoCalc, 8 Nov. 2026, kakao.mobile/tools/docker-compose-generator/.

Paste this code into your page. The widget runs in your visitors' browsers, shows no ads and keeps a link back to this page. Embedding terms

Advertisement