Docker Compose Builder

Describe your services in a form and get a valid, correctly-indented docker-compose.yml — generated in your browser.

Service: web

Service: db

docker-compose.yml

services:
  web:
    image: nginx:latest
    ports:
      - "80:80"
    depends_on:
      - db
    restart: unless-stopped
  db:
    image: postgres:16
    volumes:
      - pgdata:/var/lib/postgresql/data
    environment:
      - POSTGRES_PASSWORD=secret
      - POSTGRES_DB=app
    restart: unless-stopped

volumes:
  pgdata:

About this tool

docker-compose.yml is easy to break: YAML is indentation-sensitive, an unquoted port mapping can be misread, and a mis-nested key can stop a whole stack from coming up. This builder lets you describe services in a form and generates correctly-indented, spec-compliant Compose YAML you can drop straight into a project.

Add as many services as you need and configure the image, published ports, bind-mount and named volumes, environment variables, a restart policy, a command override and depends_on relationships. The tool quotes port mappings so values like 8080:80 aren't misread, collects named volumes into the top-level volumes: block automatically, and follows the modern Compose specification (no obsolete version: key). The YAML updates live and everything is generated in your browser.

How to use

  1. Add your services

    Create a service per container and set its image (e.g. nginx:latest, postgres:16).

  2. Configure each service

    Add ports, volumes, environment variables, a restart policy and depends_on links.

  3. Watch the YAML build

    The docker-compose.yml regenerates live as you edit, with named volumes gathered automatically.

  4. Copy or download

    Copy the YAML or download docker-compose.yml ready to run with docker compose up.

Per-service options

FieldCompose key
Imageimage:
Portsports: (quoted host:container mappings)
Volumesvolumes: (bind mounts + named volumes)
Environmentenvironment: (KEY=value list)
Restartrestart: (no / always / on-failure / unless-stopped)
Depends ondepends_on: (startup ordering)

Follows the current Compose spec — no obsolete version key.

Frequently asked questions