dcloud deploy apps createCreate an app
builder "image" needs imageRef; "compose" needs composeSource, composeService and composePort.
Synopsis
dcloud deploy apps create --name name [flags]Flags
--nameRequiredstring
Display name of the app
Constraints: 1-64 chars
--slugOptionalstring
Short name used in the app’s default hostname; must be unique in the organization; derived from name when omitted
Constraints: 1-63 chars, /^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/
--hostingOptionalenum
machine (default): the app runs on its own machines; pooled: a Next.js app on shared hosts that scales to zero, deployed from bundles your CI uploads
One of:
machine,pooled--memory-mbOptionalnumber
Pooled hosting: memory reserved for the app’s server while it runs, in MB; default 768
Constraints: integer, 256-2048
--idle-secondsOptionalnumber
Pooled hosting: seconds without a request after which the app’s server is stopped; default 300
Constraints: integer, 60-3600
--databaseOptionalenum
Pooled hosting only: postgres gives the app a Postgres database on its pool host (needs deploy:ManageHostDatabase); none (default) gives it none. An app on its own machines is refused with 400 and binds a managed Postgres instead
One of:
none,postgres--git-repository-idOptionalstring
Git repository the app builds from; required for every builder except image and compose. The app starts with that repository’s tags
--branchOptionalstring
Branch the app deploys from; omitted, the repository’s default branch (main for pooled hosting)
Constraints: 1-255 chars
--deploy-on-pushOptionalboolean (--deploy-on-push / --no-deploy-on-push)
Deploy each commit pushed to the branch, as the person who pushed it; default true when gitRepositoryId is set (always false for pooled hosting)
--root-dirOptionalstring
Directory in the repository the app is built from; default the repository root (.)
Constraints: 1-255 chars, /^[A-Za-z0-9._/-]+$/
--builderOptionalenum
How the app is built: railpack (default) detects the stack, dockerfile uses the repository’s Dockerfile, image runs imageRef, compose runs a compose file
One of:
railpack,dockerfile,forgejo_actions,image,compose--build-commandOptionalstring
Replaces the build command the builder would detect
Constraints: max 1024 chars
--start-commandOptionalstring
Replaces the command the builder would start the app with
Constraints: max 1024 chars
--image-refOptionalstring
Container image the app runs (host/repository:tag or @sha256 digest); required when builder is image. A short Docker Hub name is stored with docker.io/ in front
Constraints: 1-512 chars, /^[a-z0-9]([a-z0-9._-]*[a-z0-9])?(:[0-9]+)?(\/[a-z0-9]([a-z0-9._-]*[a-z0-9])?)*(:[A-Za-z0-9._-]+|@sha256:[a-f0-9]{64})?$/
--ecr-repository-idOptionalstring
Repository of this organization’s registry the image comes from, so the machines get a pull credential for it; for an inline compose file it is found from the file when omitted
--compose-sourceOptionalenum
Compose apps: inline takes the file text from composeFile, git reads composePath from the connected repository
One of:
inline,git--compose-fileOptionalstring
Compose apps with composeSource inline: the compose file text, checked when saved
Constraints: max 131072 chars
--compose-pathOptionalstring
Compose apps with composeSource git: path of the compose file in the repository
Constraints: 1-255 chars, /^[A-Za-z0-9._/-]+$/
--compose-serviceOptionalstring
Compose apps: the service published on the app’s domains; required
Constraints: 1-63 chars
--compose-portOptionalnumber
Compose apps: the container port of composeService that receives traffic; required
Constraints: integer, 1-65535
--portOptionalnumber
Port the app listens on in its container; default 3000
Constraints: integer, 1-65535
--instance-typeOptionalstring
Machine size of each machine, an instance type, e.g. performance-2 (the provider’s own names are still accepted, deprecated); default the region’s default size
Constraints: 1-32 chars
--replicasOptionalnumber
Number of machines; default 1. More than one puts a load balancer in front
Constraints: integer, 1-10
--release-commandOptionalstring
Command run once per deployment with /bin/sh -c in the new image, before traffic moves to it (e.g. database migrations); null or omitted runs none
Constraints: 1-4096 chars
May be null.
--release-serviceOptionalstring
Compose apps: the service whose image and environment run the release command; omitted or null, the published service
Constraints: 1-63 chars
May be null.
--release-timeout-secOptionalnumber
Seconds the release command may run before the deployment fails; a new app gets 600
Constraints: integer, 10-3600
--health-checkOptionalobject
The HTTP check a new container must pass before it gets traffic; null or omitted means GET / on the app port, any status below 500
Constraints: JSON
May be null.
--compose-health-checksOptionalmap of string
Compose apps: health checks for services other than the published one, keyed by service name
Constraints: key=<json>
May be null.
--tagsOptionalmap of string
Tags for the app, added to those inherited from the repository
Constraints: key=value
Example
dcloud deploy apps create --name exampleGenerated from the API description, the same one the API checks requests against and the CLI is built from.