Skip to content

Deploy via the CLI

The CLI runs in two modes.

ModeWhenHow it works
LocalOn the server itselfReads --config /etc/simpledeploy/config.yaml, writes directly to apps_dir.
RemoteFrom your laptop or CIUses an API key + URL stored in ~/.simpledeploy/config.yaml to call the server’s REST API.

Most people want the remote mode.

A “context” is a named (URL, API key) pair. Like kubectl config.

  1. On the server, create an API key (or use one from the dashboard):

    Terminal window
    sudo simpledeploy apikey create --name "laptop" --user-id 1
    # prints sd_xxxx once
  2. On your laptop:

    Terminal window
    simpledeploy context add prod \
    --url https://manage.example.com \
    --api-key sd_xxxx
    simpledeploy context use prod
  3. Verify:

    Terminal window
    simpledeploy list
Terminal window
# Single app
simpledeploy apply -f docker-compose.yml --name myapp
# A whole directory of apps (each subdirectory is one app)
simpledeploy apply -d ./apps/

The CLI uploads the file, the server writes it to apps_dir, the reconciler deploys.

Terminal window
# List apps and status
simpledeploy list
# Stream logs
simpledeploy logs myapp --follow
simpledeploy logs myapp --tail 200 --service db
# Pull latest image, redeploy
simpledeploy pull myapp
# Compare local compose to deployed version
simpledeploy diff -f docker-compose.yml --name myapp
# Push everything in a directory in one shot
simpledeploy sync -d ./apps/

Full command reference: CLI.