@iout/iosdev-cli
v1.0.0
Published
CLI tool to deploy Docker projects to production via SSH with live log streaming. Built by IOUT Platform Engineering.
Maintainers
Readme
@iout/iosdev-cli
Built by IOUT Platform Engineering
CLI tool to deploy your Docker projects to production via SSH — with live log streaming directly to your terminal.
Installation
npm install -g @iout/iosdev-cliSetup
1. Create your config file:
iosdev initThis creates ~/.iosdev.env. Edit it with your production server details:
IOSDEV_SSH_HOST=your-production-server.com
IOSDEV_SSH_PORT=22
IOSDEV_SSH_USER=deploy
IOSDEV_SSH_KEY=~/.ssh/id_rsa2. Make sure your SSH key has access to the production server.
Usage
Deploy
# Interactive — select projects from a menu
iosdev deploy
# Deploy all projects
iosdev deploy --all
# Deploy specific projects by alias
iosdev deploy fcsop sbca
# Deploy a single project
iosdev deploy parcelbilling
# Dry run — show commands without executing
iosdev deploy --all --dry-run
# Continue deploying remaining projects even if one fails
iosdev deploy --all --continue-on-error
# Override SSH settings on the fly
iosdev deploy fcsop --host 192.168.1.100 --user root --port 2222Logs
# Tail live logs for a project
iosdev logs fcsop
iosdev logs parcelbilling --lines 50Status
# Check container status — all projects
iosdev status
# Single project
iosdev status fcsopRemote Exec
# Run any command on production
iosdev exec "docker ps"
iosdev exec "df -h"List Projects
iosdev listConfigured Projects
| Alias | Project | Branch |
|----------------|--------------------------------------|----------|
| fcsop | Facing Client SOP | main |
| sbca | Supplier Billing Compliance Audit | main |
| parcelbilling| Parcel Billing | master |
Adding New Projects
Edit lib/projects.js and add a new entry to the projects array:
{
name: "My New Project",
alias: "mynew",
repoPath: "/opt/docker/projects/my-new-project.git",
deployPath: "/opt/docker/my-new-project",
branch: "main",
composeFile: "docker-compose.prod.yml",
services: [], // empty = all services, or ["svc1", "svc2"]
}SSH Authentication Priority
- SSH private key (
IOSDEV_SSH_KEY) - Password (
IOSDEV_SSH_PASSWORD) - SSH Agent (
SSH_AUTH_SOCK)
CLI Options
| Flag | Description |
|------|-------------|
| -a, --all | Deploy all projects |
| -d, --dry-run | Preview commands without executing |
| -c, --continue-on-error | Don't stop if a project fails |
| -H, --host <host> | Override SSH host |
| -u, --user <user> | Override SSH username |
| -k, --key <path> | Override SSH private key path |
| -p, --port <port> | Override SSH port |
Requirements
- Node.js >= 14.0.0
- SSH access to the production server
- Docker and docker-compose on the production server
License
MIT — IOUT Platform Engineering
