A powerful Docker configuration generator for creating production-ready containerized applications with TypeScript/JavaScript support, complete with database management and flexible package manager options.
A CLI tool for generating Docker configurations for JavaScript and TypeScript projects with customizable package managers and databases.
Built for modern development:
- π TypeScript or JavaScript support
- π³ Production-ready Docker configurations
- ποΈ Pre-configured databases (MySQL, MariaDB, PostgreSQL, MongoDB)
- β‘ Optional Redis cache support
- π¦ Multiple package manager support (npm, yarn, pnpm, bun)
- π οΈ Admin panels included for database management
- π§ Automatic .env file generation
- β‘ Modern Docker best practices
- π― Interactive mode for guided setup
- π¨ Simple flag-based CLI for quick configuration
Simply run the command and follow the prompts:
npx @excli/dockerThe interactive mode will guide you through selecting:
- Programming language (TypeScript or JavaScript)
- Database (MySQL, MariaDB, PostgreSQL, MongoDB)
- Package manager (npm, yarn, pnpm, bun)
For experienced users who know what they want:
# With database only
npx @excli/docker --ts --pnpm --postgres
# With database and Redis cache
npx @excli/docker --ts --pnpm --postgres --redisOr install globally:
npm install -g @excli/docker
# Interactive mode
excli-docker
# With flags
excli-docker --ts --pnpm --postgres- Node.js 20 or higher
- npm, yarn, pnpm or bun
- Docker (required for running generated configurations)
1. Interactive Mode (Easiest)
npx @excli/dockerJust answer the prompts and you're done!
2. Flag-Based Mode (Fastest)
# TypeScript with PostgreSQL and pnpm
npx @excli/docker --ts --pnpm --postgres
# JavaScript with MongoDB and npm
npx @excli/docker --js --npm --mongodb
# TypeScript with MySQL and yarn
npx @excli/docker --ts --yarn --mysql
# JavaScript with MariaDB and bun
npx @excli/docker --js --bun --mariadb--ts- TypeScript--js- JavaScript
--mysql- MySQL database--mariadb- MariaDB database--postgres- PostgreSQL database--mongodb- MongoDB database
--redis- Add Redis for caching (can be combined with any database)
--npm- npm package manager--yarn- Yarn package manager--pnpm- pnpm package manager--bun- Bun package manager
Examples:
# TypeScript with PostgreSQL and Yarn
npx @excli/docker --ts --yarn --postgres
excli-docker --ts --yarn --postgres
# JavaScript with MongoDB and pnpm
npx @excli/docker --js --pnpm --mongodb
excli-docker --js --pnpm --mongodb
# TypeScript with MySQL and bun
npx @excli/docker --ts --bun --mysql
# JavaScript with MariaDB and npm
npx @excli/docker --js --npm --mariadb
# TypeScript with PostgreSQL, pnpm, and Redis cache
npx @excli/docker --ts --pnpm --postgres --redis
# JavaScript with MongoDB, yarn, and Redis cache
npx @excli/docker --js --yarn --mongodb --redisImportant: If you're upgrading from v1.x, please note the following changes:
npx @excli/docker --lang=ts --db=postgres --pkgManager=pnpmnpx @excli/docker --ts --postgres --pnpmWhat Changed:
- Removed key-value arguments (
--lang=ts,--db=postgres,--pkgManager=pnpm) - Added simple flag-based arguments (
--ts,--postgres,--pnpm) - Added interactive mode (no arguments needed)
- Flags can be used in any order
Migration Guide:
| Old (v1.x) | New (v2.x) |
|---|---|
--lang=ts |
--ts |
--lang=js |
--js |
--db=mysql |
--mysql |
--db=mariadb |
--mariadb |
--db=postgres |
--postgres |
--db=mongodb |
--mongodb |
--pkgManager=npm |
--npm |
--pkgManager=yarn |
--yarn |
--pkgManager=pnpm |
--pnpm |
--pkgManager=bun |
--bun |
- Dockerfile - Production-optimized container configuration
- docker-compose.yml - Multi-service orchestration with proper volume paths
- .env - Environment variables for your configuration
- .env.example - Template for team members
Choose the database that fits your needs:
| Database | Admin Panel | Admin Panel Port |
|---|---|---|
| MySQL | phpMyAdmin | 6969 |
| MariaDB | phpMyAdmin | 6969 |
| PostgreSQL | pgAdmin | 6969 |
| MongoDB | Mongo Express | 6969 |
| Redis (Optional) |
All database admin panels are accessible at http://localhost:6969 after running docker compose up.
Note: Some admin panels might take a minute to initialize. Why? Great question! I wish I knew. Please be patient during first startup while they contemplate the meaning of life.
The tool automatically configures your Dockerfile for your chosen package manager:
- npm - Default Node.js package manager
- yarn - Fast, reliable, and secure dependency management
- pnpm - Efficient disk space usage with hard links
- bun - All-in-one JavaScript runtime and toolkit
docker compose up # Start database and admin panel
docker compose down # Stop all Docker services
docker compose up -d # Start services in detached modeNote: Add this script to your
package.jsonfor running your application inside Docker:"docker:run": "node dist/main.js"
After running docker compose up, access your database admin panel at http://localhost:6969
- pgAdmin - Full-featured PostgreSQL management
- phpMyAdmin - Intuitive MySQL & MariaDB interface
- Mongo Express - Simple MongoDB administration
- β Interactive Mode - No arguments needed, just follow the prompts
- β Simplified CLI - Use simple flags instead of key-value pairs
- β
Redis Cache Support - Optional
--redisflag to add Redis - β Flexible Flag Order - Flags can be used in any order
- β Better Developer Experience - Faster and more intuitive
β οΈ Breaking Changes - See migration guide above
- β Added production-ready Dockerfile templates
- β Improved environment variable management
- β Support for multiple package managers
- β Command-line arguments support with yargs
- β Cross-platform compatibility improvements
Port already in use?
Check if another service is running on port 6969, or modify the ports in your .env file.
Docker issues?
Make sure Docker Desktop is running before executing docker compose up.
Package manager not found in container? Ensure the generated Dockerfile includes the correct package manager installation steps.
Using old syntax? If you're using the old v1.x syntax, please upgrade to the new flag-based syntax. See the Breaking Changes section.
Interactive mode not working?
Make sure you're using the latest version: npm install -g @excli/docker@latest
Need help? Open an issue on GitHub with details about your problem.
Contributions are welcome! Feel free to:
- Report bugs
- Suggest new features
- Submit pull requests
- Improve documentation
ISC License - see LICENSE file for details.
Noman
π§ pxycknomdictator@gmail.com
π @pxycknomdictator
Happy coding! Built with β€οΈ for developers who value productivity.