Beautiful CLI β’ Zero Port Conflicts β’ Full Control
Manage multiple Docker Compose projects effortlessly. Automatic port allocation, interactive dashboard, and smart project templatesβall from your terminal.
Website β’ Quick Start β’ Features β’ Commands β’ Templates
# Install globally
npm install -g @grazulex/stackmark
# Register your existing project
cd ~/Dev/my-project
stackmark add
# Start the stack
stackmark start
# Open interactive dashboard
stackmark dashThat's it! StackMark handles port conflicts automatically and provides a unified interface for all your Docker stacks.
|
No more port conflicts! StackMark automatically assigns unique ports to each stack starting from 9000. |
Real-time TUI with auto-refresh showing all your stacks, their status, and running containers. |
|
Run commands from any project directoryβStackMark automatically detects which stack you're working with. |
Generate docker-compose.yml with interactive templates for Laravel, Symfony, Node.js, WordPress, and more. |
|
Sync local domains (myapp.local) to /etc/hosts with a single command. |
Colorful output, status indicators, and a modern CLI experience. |
Generate a new docker-compose.yml with interactive prompts.
cd ~/Dev/new-project
stackmark initSelect from templates (Laravel, Symfony, Node.js, etc.) or build a custom stack.
Register a stack in StackMark.
stackmark add # Use current directory
stackmark add myapp # With custom name
stackmark add myapp --path ~/Dev/myapp # With specific path
stackmark add myapp --domain myapp.local # With local domainStart a stack with automatic port management.
stackmark start # Auto-detect from current dir
stackmark start myapp # Start specific stack
stackmark start --no-override # Use original portsStop a running stack.
stackmark stop # Auto-detect
stackmark stop myapp # Stop specific stackShow detailed stack status with container info.
stackmark status # Current directory stack
stackmark status myapp # Specific stack
stackmark status --all # All stacksExample output:
π³ Stack Status
β myapp running
β http://localhost:9003
Path: /home/user/Dev/myapp
Other: db:9004, redis:9005
ββ myapp_app: Up 5 minutes
ββ myapp_db: Up 5 minutes
ββ myapp_nginx: Up 5 minutes
List all registered stacks with their status.
stackmark list
stackmark lsExample output:
π¦ Stacks
β myapp
β http://localhost:9003
/home/user/Dev/myapp
β other-project
β http://localhost:9007
/home/user/Dev/other-project
Interactive dashboard with real-time updates.
stackmark dashboard
stackmark dashFeatures:
- Auto-refresh every 2 seconds
- Running/stopped/partial status indicators
- Press q to quit
Open the stack's main URL in your browser.
stackmark open # Auto-detect
stackmark open myapp # Specific stackRestart a stack.
stackmark restart # Auto-detect
stackmark restart myapp # Specific stack
stackmark restart --no-override # With original portsView stack logs.
stackmark logs # Auto-detect
stackmark logs myapp # Specific stack
stackmark logs -f # Follow modeRemove a registered stack.
stackmark remove myapp
stackmark rm myappSync local domains to /etc/hosts.
sudo stackmark hosts syncGenerate complete Docker Compose configurations with stackmark init:
| Template | Stack |
|---|---|
| Laravel | PHP + Nginx + MySQL + Redis + Mailpit |
| Symfony | PHP + Nginx + PostgreSQL + Redis + Mailpit |
| Node.js | Node + PostgreSQL + Redis |
| WordPress | PHP + Nginx + MariaDB + Redis + Mailpit |
| API | PHP + Nginx + PostgreSQL + Redis |
| Custom | Choose your own services |
| Category | Services |
|---|---|
| Runtime | PHP (8.3, 8.2, 8.1), Node.js (22, 20, 18) |
| Webserver | Nginx |
| Database | MySQL, MariaDB, PostgreSQL |
| Cache | Redis, Memcached |
| Tools | Mailpit, MinIO (S3), phpMyAdmin |
- When you
stackmark adda project, StackMark scans docker-compose.yml for port mappings - It allocates unique external ports starting from 9000
- When you
stackmark start, it creates a temporary override file - Your original docker-compose.yml is never modified
Original docker-compose.yml:
services:
nginx:
ports:
- "80:80"
db:
ports:
- "3306:3306"StackMark allocates:
nginx: localhost:9003 β container:80
db: localhost:9004 β container:3306
Need to test with original ports? No problem:
stackmark start --no-overrideConfiguration is stored in ~/.stackmark/config.yml:
stacks:
myapp:
path: /home/user/Dev/myapp
domains:
- myapp.local
portMappings:
- service: nginx
internal: 80
external: 9003
- service: db
internal: 3306
external: 9004
nextPort: 9010Most commands auto-detect the stack when run from a project directory:
cd ~/Dev/myapp
stackmark start # Starts myapp
stackmark logs -f # Shows myapp logs
stackmark status # Shows myapp statusOverride auto-detection when needed:
stackmark status --all # Show all stacks
stackmark start other # Start a different stacknpm install -g @grazulex/stackmarknpx @grazulex/stackmark dashstackmark --version| Feature | StackMark | Docker Compose | Dockstation | Portainer |
|---|---|---|---|---|
| CLI-first | β | β | β | β |
| Auto Port Allocation | β | β | β | β |
| Project Templates | β | β | β | |
| Multi-stack Dashboard | β | β | β | β |
| Zero Config | β | β | β | |
| Auto-detection | β | β | β | β |
| Hosts Sync | β | β | β | β |
Check which stacks are using ports:
stackmark status --allOr use original ports:
stackmark start --no-overrideThe hosts sync command requires sudo:
sudo stackmark hosts syncMake sure you're in the project root (where docker-compose.yml is located) or specify the stack name.
Contributions are welcome! Whether it's:
- π Bug reports
- β¨ Feature requests
- π Documentation improvements
- π§ Code contributions
MIT Β© Grazulex
π Website β’ π¦ npm β’ π Issues β’ π¬ Discussions
Built with β€οΈ for developers who juggle multiple Docker projects
Star this repo if StackMark simplifies your workflow! β