Docker Compose Generator – docker-compose.yml Builder
NOVODocker Compose generator: add Node, Postgres, MySQL, Redis, Mongo or Nginx services with ports, env, volumes and healthchecks, and get valid YAML.
Funciona 100% no seu navegador — o que você insere nunca é enviado nem armazenado nos nossos servidores.
Esta ferramenta ainda não está totalmente traduzida, por isso parte do texto continua em inglês. A ferramenta funciona da mesma forma em todos os idiomas.
- warning: Service "db": POSTGRES_PASSWORD is a placeholder. Use a real secret, ideally via an .env file or Docker secrets.
Generated Docker Compose filedocker-compose.yml
# docker-compose.yml generated by UsefulTools.dev
# Start: docker compose up -d Validate: docker compose config
services:
app:
build: "."
restart: "unless-stopped"
ports:
- "3000:3000"
environment:
NODE_ENV: "production"
PORT: "3000"
depends_on:
db:
condition: "service_healthy"
db:
image: "postgres:17"
restart: "unless-stopped"
ports:
- "5432:5432"
environment:
POSTGRES_USER: "app"
POSTGRES_PASSWORD: "change-me"
POSTGRES_DB: "app"
volumes:
- "pgdata:/var/lib/postgresql/data"
healthcheck:
test:
- "CMD-SHELL"
- "pg_isready -U app -d app"
interval: "10s"
timeout: "5s"
retries: 5
volumes:
pgdata:
Exemplos rápidos
Entradas típicas e os resultados que esta ferramenta gera.
Visão geral
Docker Compose describes a multi-container app in one YAML file: which images to run, their ports, environment variables, volumes, dependencies and restart policies. This Docker Compose generator builds that file from service cards, with presets for a Node app, PostgreSQL, MySQL, Redis, MongoDB, Nginx and any custom image.
Named volumes and networks are declared automatically, depends_on switches to service_healthy when the dependency has a healthcheck, and the output is serialised with js-yaml so it is always valid YAML. Host port conflicts, invalid ports, dependency cycles and placeholder passwords are flagged as you type. Everything stays in your browser.
The file updates live as you edit and covers the common service keys: image, build, command, ports, environment, volumes, networks, restart, depends_on and healthcheck. Other Compose options, such as profiles, secrets, deploy or resource limits, are not generated, so add them by hand if you need them.
Por que usar esta ferramenta?
- Database presets with working healthchecks
- Port conflicts caught before docker compose up
- Named volumes declared for you
- Always-valid YAML, no indentation mistakes
- Runs locally, your passwords stay private
Recursos
Service presets
Node, Postgres, MySQL, Redis, Mongo, Nginx and custom image with sensible defaults.
Healthchecks
CMD-SHELL test with interval, timeout and retries; dependants wait for service_healthy.
Volumes and networks
Named volumes and networks are detected and declared at the top level.
Validation
Duplicate names, port conflicts, invalid ports, durations and depends_on cycles.
Valid YAML
Generated with js-yaml and quoted values, with a short comment header.
Download
Save as docker-compose.yml or copy to the clipboard.
Como usar
Add services
Choose a preset in "Add a service" and press + Add.
Edit each card
Set image or build context, ports, environment, volumes and restart policy.
Wire dependencies
Tick "Depends on" and enable healthchecks where startup order matters.
Download and run
Download the file and run docker compose up -d.