-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Mikhail Konin edited this page Feb 28, 2026
·
3 revisions
Deploy to multiple Docker Swarm servers from one repo β no config drift, no rollback scripts, no CI boilerplate.
Your Repo βββ SwarmCLI βββ ββ dev-server (17 stacks)
ββ prod-server (18 stacks)
ββ db-server (1 stack)
You manage several Docker Swarm servers β dev, staging, prod, maybe a dedicated database host. Each one has its own configs, scattered across repos or maintained by hand. Deploying means writing 50+ lines of CI pipeline per stack, copy-pasting docker stack deploy with slight variations. Rollback? A hand-written script you hope still works. Secrets live in .env files shared over Slack.
SwarmCLI exists to make all of this a single command.
-
One-command deploy β
swarmcli deploy my-stacksends the right config to the right server -
Instant rollback β
swarmcli rollback my-stackrestores the previous version - Profile-based isolation β one repo, different settings per server
- Minimal CI config β one CLI call instead of 50 lines of pipeline YAML
-
Docker-familiar commands β
ls,ps,logs,deploy - Secure secrets β Docker Secrets & Configs, synced automatically before deploy
- Per-stack isolation β each stack owns its repos and data
-
JSON output β
--jsonfor automation, webhooks, monitoring
| Without SwarmCLI | With SwarmCLI |
|---|---|
| Separate configs per server | Single repo, profile-based isolation |
docker stack deploy + manual steps |
swarmcli deploy my-stack |
| Custom rollback scripts | swarmcli rollback my-stack |
SSH + docker service logs
|
swarmcli logs my-stack --service api |
| 50+ lines of CI config per stack | One CLI call, minimal pipeline config |
| Secrets in env files or manual sync |
swarmcli secret sync + Docker Secrets |
1. Create a profile β One per server (dev, prod, db)
2. Define stacks β Apps with services, variables, secrets
3. swarmcli deploy <stack> β Syncs repos β builds images β deploys
4. swarmcli ps <stack> β Verify everything is running
5. swarmcli rollback β Something wrong? One command to undo
| Role | How you use it |
|---|---|
| DevOps | Set up profiles, CI/CD pipelines, manage secrets |
| Backend dev | Deploy your services, check logs, rollback |
| Frontend dev | Deploy, check service status |
| QA | Deploy feature branches for testing |
# Install
git clone https://github.com/KoninMikhail/swarmcli.git /opt/swarmcli && cd /opt/swarmcli
./install.sh
# Create your first profile from the example
cp -r examples/profiles/example-server profiles/my-server
# Select the profile
swarmcli use my-server
# Deploy a stack
swarmcli deploy core-backend
# Check status
swarmcli ps core-backend
# Something wrong? Rollback instantly
swarmcli rollback core-backendβ See Quick-Start for the full walkthrough.
- Requirements β system requirements
- Installation β install and configure
- Quick-Start β first deploy in 5 minutes
- Glossary β terms and definitions
- Profiles β server profiles and isolation
- Stacks β application stacks
- Services β service types (git, registry, none)
- Deploy-Flow β what happens on deploy
- Create-Profile β create a server profile
- Create-Stack β create an application stack
- Deployment-Guide β deploy, monitor, manage
- Rollback β revert to previous version
- Secrets-Management β secure secret handling
- Jinja2-Templating β template-based stack configs
- Resource-Management β CPU/Memory management
- CI-CD-Integration β GitLab CI / GitHub Actions
- CLI-Reference β all commands and flags
- Configuration-Files β YAML file formats
- Environment-Variables β all environment variables
- Troubleshooting β common issues and solutions
For architecture details, ADRs, and internals β see docs/ in the main repository.
| SwarmCLI | Raw Docker CLI | Portainer | Kubernetes | |
|---|---|---|---|---|
| Profile isolation | Built-in | Manual | No | Namespaces |
| One-command deploy | Yes | Multiple steps | GUI-based | Helm |
| Built-in rollback | Yes | Manual | Limited | Yes |
| CI/CD integration | Native | DIY | Webhooks | DIY |
| Secrets management | Built-in | Manual | GUI | Built-in |
| Jinja2 templating | Built-in | No | No | Helm templates |
| Learning curve | Low | Low | Medium | High |
| Setup complexity | Minimal | Minimal | Medium | High |
- Platform: Linux (Ubuntu 20.04+, Debian 11+, CentOS 8+)
- Written in: Bash + Python
- License: MIT
- GitHub Repository
- Changelog
- Contributing
SwarmCLI Β· Report Issue Β· Contributing Β· MIT License