app create
Create an application and deploy it.
Creates an application and deploys it in the same call. Source, ports, variables, disks, size and instance count can all be set here, so nothing has to be filled in afterwards.
The name is the one decision that cannot be revised. It becomes part of the public
address and stays for the life of the application, which is why app rename
changes only the label it is shown under.
Usage
outplane app create <NAME> [flags]Arguments
| Argument | Type | Description |
|---|---|---|
NAME | string | Letters and numbers, 5 to 45 characters. Permanent. Required. Must match ^[a-zA-Z0-9]{5,45}$. |
Flags
| Flag | Type | Description |
|---|---|---|
--repo | string | Repository as owner/name. Requires --branch. Not valid with --image. |
--branch | string | Branch to deploy, usually main. Required with --repo. |
--public-repo | bool | The repository is public, so no installation is needed to read it. |
--image | string | Container image to run, such as nginx:latest. Not valid with --repo. |
--build | string | How the repository becomes an image. Ignored for --image. Defaults to dockerfile. One of dockerfile, buildpack. |
--dir | string | Sub-directory to build, when the repository holds more than one app. |
--start-command | string | Overrides the image's own command. |
--port | strings | PORT[:SCHEME[:public|private]], repeatable. Defaults to http and private, e.g. 3000 or 3000:http:public. |
--env | strings | KEY=VALUE, repeatable. Values are never printed back. |
--size | string | Instance type. Larger ones may need a paid plan. Defaults to op-20. One of op-20, op-22, op-34, op-46, op-58, op-70, op-82, op-94. |
--instances | int | Replica count, 1 to 5. Defaults to 1. |
--volume | strings | VOLUME_ID:/path, repeatable. The volume must already exist and be detached. |
--env-group | strings | Id of a shared variable group to assign, repeatable. |
The global flags apply as well.
Output
| Field | Type | Description |
|---|---|---|
name | string | |
appId | string | null | Null for a dry run. |
deploymentId | int | null | The deployment creation started. Queued, not finished. |
source | string | One of github, container-registry. |
repository | string | null | |
branch | string | null | |
imageRef | string | null | |
buildMethod | string | Dockerfile, buildpack, or prebuilt-image for an image app whatever --build said. |
size | string | |
instances | int | |
ports | array | {port, scheme, public}. |
envCount | int | How many variables were set. Values are never returned. |
changed | bool | False for a dry run. |
Examples
From a repository
outplane app create checkout --repo acme/checkout --branch main --port 3000:http:publicFrom a container image
outplane app create proxy01 --image nginx:latest --port 80:http:publicWith variables and a larger instance
outplane app create worker01 --image redis:7 --port 6379:tcp --env MODE=queue --size op-34Create one and read the ids in a pipeline
outplane app create checkout --image nginx:latest --port 80 --json --fields appId,deploymentId{
"appId": "3f2b1c4e-0000-0000-0000-000000000000",
"deploymentId": 4821
}Check the request without sending it
outplane app create checkout --repo acme/checkout --branch main --dry-runWhat to Know
- Creating deploys. deploymentId is a queued deployment, not a finished one; follow it with
outplane deploy logs <id>or checkoutplane deploy get <id> <name>. - The name is permanent and appears in the public address. Letters and numbers only, five characters or more, and a set of infrastructure-sounding names is refused.
- --repo needs --branch; --image forbids one. Passing both sources is an error rather than a preference.
- A private repository is read through the GitHub installation of the user whose token this is. --public-repo skips that, and is the only way to create from a repository the platform has no installation for.
- app.repository_unavailable covers three situations the server does not distinguish: the repository does not exist, the GitHub App is not installed at all, or it is installed without access to this one. The error carries the page that fixes the last two.
- A port is private unless it says public. A private port is reachable by other applications and by a custom domain, and has no platform address.
- Everything the server would refuse is checked first, so an error names the field. The exceptions are the plan limit and the name already being taken, which only the server knows.
- Variable values are never echoed back. envCount reports how many were set.
- --volume and --env-group take ids of things that already exist. Attaching is best effort on the server: one it cannot attach is skipped and the creation succeeds anyway, so confirm with
outplane app getwhen it matters.
Errors
Beyond 0 for success, this command exits with:
| Exit | Kind | Meaning |
|---|---|---|
2 | usage | Invalid arguments, unknown flag, or client-side validation failure. |
3 | auth | Not authenticated, token revoked or expired, or forbidden for this team. |
7 | quota | Plan limit reached or payment required. Not a rate limit; retrying will not help. |
8 | upstream | The Out Plane API returned a server error. |
The code on the error object is one of app.name_invalid, app.name_reserved, app.source_required, app.source_conflict, app.repository_invalid, app.branch_required, app.size_invalid, app.instances_invalid, app.port_invalid, app.port_duplicate, app.repository_unavailable, app.mount_invalid, app.mount_duplicate, usage.bad_mount, usage.bad_port, usage.bad_assignment, quota.limit_reached. Branch on that, or on the exit status. The message is prose and changes.