Out Plane
app

app create

Create an application and deploy it.

writes--dry-run

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

ArgumentTypeDescription
NAMEstringLetters and numbers, 5 to 45 characters. Permanent. Required. Must match ^[a-zA-Z0-9]{5,45}$.

Flags

FlagTypeDescription
--repostringRepository as owner/name. Requires --branch. Not valid with --image.
--branchstringBranch to deploy, usually main. Required with --repo.
--public-repoboolThe repository is public, so no installation is needed to read it.
--imagestringContainer image to run, such as nginx:latest. Not valid with --repo.
--buildstringHow the repository becomes an image. Ignored for --image. Defaults to dockerfile. One of dockerfile, buildpack.
--dirstringSub-directory to build, when the repository holds more than one app.
--start-commandstringOverrides the image's own command.
--portstringsPORT[:SCHEME[:public|private]], repeatable. Defaults to http and private, e.g. 3000 or 3000:http:public.
--envstringsKEY=VALUE, repeatable. Values are never printed back.
--sizestringInstance 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.
--instancesintReplica count, 1 to 5. Defaults to 1.
--volumestringsVOLUME_ID:/path, repeatable. The volume must already exist and be detached.
--env-groupstringsId of a shared variable group to assign, repeatable.

The global flags apply as well.

Output

FieldTypeDescription
namestring
appIdstring | nullNull for a dry run.
deploymentIdint | nullThe deployment creation started. Queued, not finished.
sourcestringOne of github, container-registry.
repositorystring | null
branchstring | null
imageRefstring | null
buildMethodstringDockerfile, buildpack, or prebuilt-image for an image app whatever --build said.
sizestring
instancesint
portsarray{port, scheme, public}.
envCountintHow many variables were set. Values are never returned.
changedboolFalse for a dry run.

Examples

From a repository

outplane app create checkout --repo acme/checkout --branch main --port 3000:http:public

From a container image

outplane app create proxy01 --image nginx:latest --port 80:http:public

With variables and a larger instance

outplane app create worker01 --image redis:7 --port 6379:tcp --env MODE=queue --size op-34

Create 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-run

What to Know

  • Creating deploys. deploymentId is a queued deployment, not a finished one; follow it with outplane deploy logs <id> or check outplane 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 get when it matters.

Errors

Beyond 0 for success, this command exits with:

ExitKindMeaning
2usageInvalid arguments, unknown flag, or client-side validation failure.
3authNot authenticated, token revoked or expired, or forbidden for this team.
7quotaPlan limit reached or payment required. Not a rate limit; retrying will not help.
8upstreamThe 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.

On this page