Skip to content

reoclo apps

reoclo apps ls
reoclo apps create [options]
reoclo apps get <idOrSlug>
reoclo apps deploy [options] <idOrSlug>
reoclo apps logs [options] <idOrSlug>
reoclo apps restart <idOrSlug>

Lists every application in the active tenant with its slug, target server, CI gate state, last deployment status, and current deployment ref.

Terminal window
$ reoclo apps ls
SLUG SERVER CI LAST DEPLOY REF
api prod-web-1 on ✓ succeeded deadbeef
worker prod-web-1 on ✓ succeeded deadbeef
docs staging-web off ✓ succeeded abc1234
admin prod-web-1 off ✗ failed cafe999

Creates an application on a server. --name and --server are required. Flags you leave out keep the API’s defaults.

FlagDescription
--name <name>Application name. Required.
--server <nameOrId>Server the application runs on. Required.
--repo <nameOrId>Repository to build from.
--build-pack <pack>Build strategy: dockerfile, docker_compose, or docker_image.
--docker-image <ref>Image to run. Build pack docker_image.
--compose-file <path>Compose file path in the repository. Build pack docker_compose.
--compose-service <name>Compose service to deploy. Build pack docker_compose.
--deploy-branch <branch>Branch that deploys.
--require-ciDeploy a push only after its CI checks pass.
--no-auto-deployDo not deploy on push. Auto-deploy is on by default.
--bind <project>Bind a secret project, by name or id. Repeatable.

A compose flag implies --build-pack docker_compose, and --docker-image implies --build-pack docker_image, so you can leave --build-pack out. A flag that conflicts with an explicit --build-pack is rejected (exit code 2).

Terminal window
$ reoclo secrets projects create staging-secrets
$ reoclo apps create --name stack --server web1 --repo acme/web \
--compose-file deploy/compose.staging.yml --compose-service web \
--deploy-branch staging --require-ci --bind staging-secrets
✓ created application stack (id: 019dc1a8-841f-7102-ac5d-3ee9e9353795)

Pass -o json to print the created application record. Secret project bindings apply on the next deploy. See reoclo secrets projects create and reoclo secrets bind.

Shows the full application record: server, repository, build configuration (Dockerfile, Nixpacks, or buildpack), deployment policy, attached domains, and the most recent few deployments.

Terminal window
reoclo apps get api
reoclo apps get 019dc1a8-841f-7102-ac5d-3ee9e9353795

Triggers a deployment for an application. Returns once the deployment has been queued. Pass --wait (when shipped) to block until the deployment finishes.

FlagDescription
--ref <branch|tag|sha>Deploy this ref once (default: the configured branch’s HEAD). The application’s deploy branch does not change.
--force-recreateRecreate the containers even when the image and the configuration did not change. Applies to compose deploys. A Dockerfile or image deploy replaces its containers on every deploy.
--waitWait for the deployment to reach a terminal state. (Coming in v1.x.)
Terminal window
reoclo apps deploy api
reoclo apps deploy api --ref v2.4.1
reoclo apps deploy api --ref $(git rev-parse HEAD)
reoclo apps deploy api --force-recreate

A --ref deploy is a one-off: it builds and deploys the ref you name, and the next push or plain deploy goes back to the configured branch. It requires the edit_config permission on applications. An application without a linked repository rejects --ref.

After triggering, fetch the deployment logs:

Terminal window
LATEST=$(reoclo deployments ls --app api --limit 1 -o json | jq -r '.[0].id')
reoclo deployments logs --build "$LATEST"

Fetches recent container logs for an application. The container name is resolved automatically from the application record (it uses the linked_container_name if set, otherwise the canonical reoclo-{tenant}-{slug} derivation).

FlagDefaultDescription
--tail <n>200Number of lines to return.
--since <ts>(none)RFC 3339 timestamp. Only return lines after this time.
--search <term>(none)Substring filter applied server-side.
Terminal window
reoclo apps logs api --tail 500
reoclo apps logs api --search 'error'
reoclo apps logs api -o json | jq '.entries[] | select(.level == "error")'

For full server-wide log access including non-application sources (system journal, runner, and so on), use reoclo logs tail.

Restarts the container backing an application by issuing docker restart against the resolved container name. Returns the container name and the runner’s exit code. Non-zero exit codes propagate as a CLI failure.

Terminal window
reoclo apps restart api

restart is one of the few commands available to Automation Keys. See CI/CD automation.

reoclo apps deploy is one of the few commands available to Automation Keys. See CI/CD automation for examples.

CodeMeaning
0Deployment queued (or, with --wait, succeeded)
1Server-side error
3Authentication failure
2Bad flags, for example apps create with a --compose-file and --build-pack dockerfile
4Key type not allowed for this command, or the caller lacks a required permission (for example --ref without edit_config)
5App, server, repository, or secret project not found
7Control plane unreachable: DNS, connection refused, or timeout (CLI 0.55.0+, earlier versions report 1)