Docker Compose Generator – docker-compose.yml Builder
NOUVEAUDocker Compose generator: add Node, Postgres, MySQL, Redis, Mongo or Nginx services with ports, env, volumes and healthchecks, and get valid YAML.
Fonctionne à 100 % dans votre navigateur — vos données ne sont jamais envoyées ni stockées sur nos serveurs.
Cet outil n'est pas encore entièrement traduit : une partie du texte est encore en anglais. L'outil lui-même fonctionne de la même façon dans toutes les langues.
- 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:
Exemples rapides
Des entrées typiques et les résultats produits par cet outil.
Présentation
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.
Pourquoi utiliser cet outil ?
- 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
Fonctionnalités
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.
Mode d'emploi
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.