Build a Docker Compose file visually — services, images, ports, volumes and environment variables.
How to use this tool
One service per line: name | image | ports | volumes | environment. Leave a section empty to skip it.
unless-stopped is the usual default for servers that should survive a reboot.
The compose.yaml content appears in the output box.
Download as compose.yaml and run docker compose up in that folder.
Formula & worked example
Services "app | nginx:latest | 8080:80" and "db | postgres:16 | 5432:5432" produce a services: block with both services, quoted port mappings and restart: unless-stopped.
Limitations — read this before you rely on it
This covers single-host Compose services with image, ports, volumes, environment and restart policy only. Not covered: build: sections, networks, secrets, healthchecks, resource limits, profiles, multi-file overrides and Swarm deployment settings — add those by hand for production use.
Frequently asked questions
compose.yaml (modern) or docker-compose.yml (legacy) — both are read by Docker Compose.
Yes — Docker and Docker Compose on the machine that will run the services. This tool only writes the file.
No. Plain environment values in a compose file are visible to anyone who can read the file. Use Docker secrets or your platform's secret store for real credentials.
No. This version generates image-based services only. Add a build: section by hand if you build from a Dockerfile.
So YAML reads 8080:80 as a string mapping, not a number or sexagesimal value.
