Skip to content

reoclo up

reoclo up [options]

reoclo up takes a repository that is linked to Reoclo and deploys it. The first run creates what the repository needs: a stack when it has a compose file, or an application when it has a Dockerfile. Every later run deploys what the first run created. Available from CLI 0.93.0.

Terminal window
$ cd ~/code/storefront
$ reoclo up --server prod-web-1
✓ created stack storefront (id: 01a18b8f-0fa0-76b1-bc2c-2b713373149c) with 2 service(s) from docker-compose.yml
...
stage build: succeeded (4.0s)
stage up: succeeded (1.6s)
stage verify: succeeded (0.9s)
deployment #1: succeeded
$ git push && reoclo up
deploying existing stack storefront
...
stage build: succeeded (2.4s)
stage up: succeeded (0.9s)
stage verify: succeeded (0.8s)
deployment #2: succeeded

Run reoclo up inside a git checkout and it reads the origin remote (https://, ssh://, or git@ form) and matches it to a linked repository by its full name. Pass --repo with the repository’s owner/name, slug, or id to name it yourself, for example in CI or from another folder.

The repository must be linked first. If reoclo up cannot find it, link it with reoclo repos link:

Terminal window
reoclo repos link acme/storefront

When the repository has no stack or application yet, reoclo up creates one. --server is required on this run.

  1. It scans the repository at --branch (default: the repository’s default branch), the same scan as reoclo repos scan.
  2. A repository with a compose file becomes a stack with one member for each service in that file. Pick the file with --compose-file when there is more than one. The stack deploys the scanned branch.
  3. A repository without a compose file becomes an application built from its Dockerfile. Pick the service with --service when the scan finds more than one Dockerfile.
  4. It deploys what it created.

reoclo up finds the stack built from the repository’s compose file, or the application built from the repository that is not part of a stack, and deploys it. --server is not needed. When more than one matches, it lists them and asks for --compose-file or --service.

--compose-file looks only for a stack, and --service looks only for an application. --branch on a later run deploys that ref of an application once; a stack always deploys its own branch, so --branch is ignored for a stack, with a note.

FlagDescription
--repo <repo>Linked repository to deploy (owner/name, slug, or id). Default: the origin remote of the current checkout.
--server <nameOrId>Server for the stack or application. Required on the first run.
--branch <branch>Branch to scan and deploy when creating. Default: the repository’s default branch.
--compose-file <path>Compose file to use when the repository has more than one.
--service <name>Dockerfile service to use when the repository has more than one, or the application to deploy when several match.
--name <name>Name of the stack or application the first run creates. Default: the repository name for a stack, the detected service name for an application.
--force-recreateRecreate containers even when the image and the configuration did not change.
--no-waitReturn as soon as the deployment is triggered instead of waiting for it to finish.
--wait-timeout <seconds>Give up waiting after this long (default 600, exit code 12).

reoclo up waits for the deployment by default, prints each stage as it changes, and exits non-zero when the deployment does not succeed.

CodeMeaning
0Deployment succeeded (or, with --no-wait, queued)
1The deployment failed, or a server-side error
2Bad flags, for example a first run without --server, or several matches without --compose-file or --service
4The caller lacks a required permission
5Repository or server not found, or the repository is not linked
12Timed out waiting for the deployment