← Catalog

Node.js source code: 7 .js modules (CommonJS), launched via node 01_cli.js or through an npm script. Input format — YAML service description, output — docker-compose.yml, nginx.conf, .env, Makefile.

ComposeForge CLI — Docker Compose, Nginx & .env Generator from YAML

Version 1.0.0 Updated: 2026-10-03 Quality: 78/100

A Node.js CLI utility that turns a single YAML file describing your services into a working docker-compose.yml, nginx.conf, .env, healthcheck, and Makefile—so you can deploy your project with a single command.

📁 What is inside (ZIP, 8 files)
  • 01_cli.js
  • 02_config_schema.js
  • 03_generate_compose.js
  • 04_generate_nginx.js
  • 05_generate_env.js
  • 06_generate_makefile.js
  • 07_utils.js
  • README.md

Problem

Setting up infrastructure for a new project or microservice turns into a routine: developers copy docker-compose.yml from old repositories, manually edit nginx.conf, come up with passwords for .env, forget about healthcheck and Makefile. This leads to config desync, deployment errors, and lost time for the entire team.

Solution

A CLI utility takes a single YAML service description and generates a consistent set of files: docker-compose.yml with dependencies, networks, volumes, and healthcheck; nginx.conf with upstream and proxying; .env with random secrets; and a Makefile for managing the stack. Schema validation catches errors before generation and points to the problematic field, while --dry-run and --verbose modes make the process transparent.

More details

ComposeForge CLI is a ready-to-use Node.js command-line tool that turns a short YAML description of your project into a fully working set of infrastructure files. You describe your services (application language, ports, database, environment variables), run a single command — and get a docker-compose.yml with all dependencies, networks, volumes, and healthcheck, a ready-to-use nginx.conf with upstream blocks and proxying, a .env with generated passwords and keys, plus a Makefile for managing the stack. The tool eliminates the routine every small team faces when starting a new project or adding a service. Instead of copying compose file snippets from old projects, manually editing nginx, and coming up with passwords — you keep a single, clear YAML description as your source of truth. Changed a port or added a service? Regenerate your configs in seconds. Under the hood is a modular architecture built from seven files. The entry point, 01_cli.js, parses arguments (--input, --output, --dry-run, --verbose), loads the YAML, and orchestrates generation. The 02_config_schema.js module validates the input schema: it checks required fields, types, valid language and database values, normalizes the data, and returns errors with the exact path to the problematic field. Then the generators take over: 03_generate_compose.js assembles the compose file with Node.js, Python, Go, and PHP services, connects PostgreSQL, MySQL, MongoDB, or Redis with environment variables, and configures healthcheck, volumes, and networks. 04_generate_nginx

What you get

  • 01_cli.js — CLI entry point: argument parsing, YAML loading, validation, generation orchestration, error handling
  • 02_config_schema.js — validation and normalization of input YAML with error field path reporting
  • 03_generate_compose.js — docker-compose.yml generation: services, dependencies, volumes, networks, healthcheck, database connection
  • 04_generate_nginx.js — nginx.conf generation: upstream, proxying, static files, SSL stubs, gzip, logging, multiple domains and ports
  • 05_generate_env.js — .env generation: database variables, ports, service URLs, random secret keys, variables from YAML
  • 06_generate_makefile.js — Makefile generation: up, down, build, logs, restart, ps, exec, clean
  • 07_utils.js — utility functions: file operations, random string generation, formatting, leveled logging

Installation guide

1. Install Node.js 18+ and make sure docker and docker compose are available. 2. Copy the files 01_cli.js–07_utils.js into your project directory. 3. Install dependencies: js-yaml (npm install js-yaml). 4. Prepare services.yaml describing your services (name, services with language, ports, database, environment variables). 5. Run: node 01_cli.js --input services.yaml --output ./out --verbose. 6. For a preview without writing files, use --dry-run. 7. Move the generated docker-compose.yml, nginx.conf, .env, and Makefile to your project root. 8. Launch the stack: make up.

Requirements

Node.js 18+, the js-yaml package, and Docker with Docker Compose installed to run the generated files. No additional accounts or cloud services required.

Options and pricing

Choose the level that suits you:

  • Basic — $17 · Основной набор файлов продукта.
  • Standard — $29 · Полный набор + инструкция по внедрению.
  • Extended — $46 · Всё из Стандарта + расширенные материалы и обновления.

Frequently asked questions

What is included?

A Node.js CLI utility that turns a single YAML file describing your services into a working docker-compose.yml, nginx.conf, .env, healthcheck, and Makefile—so you can deploy your project with a single command.

In what format will I receive the files?

After payment you get a secure link and a ZIP archive with all materials. The link is shown on the order page and available via the Telegram bot.

How long is the download link valid?

The link is active for 24 hours, up to 5 downloads.

Do I need special skills?

The product is designed for entrepreneurs and specialists. A step-by-step guide is included; no programming skills required.

Can I get a refund?

For refunds, contact support: [email protected].

See also