>_toolkitbox

~/tools / Docker Compose Generator

Docker Compose Generator

Add services to build a docker-compose.yml boilerplate. Ports, environment variables, and volumes accept comma-separated lists.

Hand-writing docker-compose.yml for a multi-container setup (app + DB, etc.) every time gets old. Add services through a form and get a working YAML skeleton.

# Use Cases

  • Spinning up a local dev environment (app + DB) with docker-compose.yml quickly
  • Adding a new service to a compose setup without introducing a YAML indentation mistake
  • Quickly scaffolding a multi-container setup for a test/demo

# Usage

  1. Fill in a service name, image, ports, environment variables, and volumes for each service (use a comma-separated list like "3000:3000, 3001:3001" for multiple ports).
  2. Click "+ Add service" to build a multi-container setup.
  3. Copy the generated YAML and save it as docker-compose.yml.
Service #1
Service #2
services:
  web:
    image: node:20-alpine
    ports:
      - "3000:3000"
    environment:
      - NODE_ENV=production
    restart: unless-stopped
  db:
    image: postgres:16-alpine
    ports:
      - "5432:5432"
    environment:
      - POSTGRES_PASSWORD=example
    volumes:
      - db_data:/var/lib/postgresql/data
    restart: unless-stopped

volumes:
  db_data:

# FAQ

Is the generated YAML production-ready?
It's a basic starting point. Network configuration, health checks, depends_on, and other production concerns typically need to be added for your specific project.
Is this an official Docker tool?
No, this is an independent, unofficial generator — not affiliated with Docker, Inc.

# Related