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.
$ 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 updeploying existing stack storefront...stage build: succeeded (2.4s)stage up: succeeded (0.9s)stage verify: succeeded (0.8s)deployment #2: succeededWhich repository
Section titled “Which repository”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:
reoclo repos link acme/storefrontFirst run
Section titled “First run”When the repository has no stack or application yet, reoclo up creates one. --server is required on this run.
- It scans the repository at
--branch(default: the repository’s default branch), the same scan asreoclo repos scan. - A repository with a compose file becomes a stack with one member for each service in that file. Pick the file with
--compose-filewhen there is more than one. The stack deploys the scanned branch. - A repository without a compose file becomes an application built from its Dockerfile. Pick the service with
--servicewhen the scan finds more than one Dockerfile. - It deploys what it created.
Later runs
Section titled “Later runs”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.
Options
Section titled “Options”| Flag | Description |
|---|---|
--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-recreate | Recreate containers even when the image and the configuration did not change. |
--no-wait | Return 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.
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
| 0 | Deployment succeeded (or, with --no-wait, queued) |
| 1 | The deployment failed, or a server-side error |
| 2 | Bad flags, for example a first run without --server, or several matches without --compose-file or --service |
| 4 | The caller lacks a required permission |
| 5 | Repository or server not found, or the repository is not linked |
| 12 | Timed out waiting for the deployment |
Related
Section titled “Related”reoclo repos: link and scan repositoriesreoclo groups create: create a stack without deploying itreoclo apps create: create an application with every option