doctl Verified current stable Not installed? Cloud Infrastructure

Doctl / Create Deployment App Doctl

Create Deployment App Doctl

Deploy an application within DigitalOcean using the `doctl` CLI.

$
Terminal
doctl a cd <app_id>

When To Use

During a deployment process in a CI/CD pipeline.

Pro Tip

Ensure your app is prepared to handle rolling updates; consider using the `--auto-rollback` flag if available.

Command Builder

Tune the command before you copy it

Back to syntax
$
Generated Command
doctl a cd <app_id>

Anatomy of Output

Understanding the result

Deployment created: my-app-123456 Deployment Name

The name given to the deployment instance.

Status: pending Deployment Status

Indicates that deployment process is currently in queue.

Created At: 2023-10-01T12:00:00Z Deployment Timestamp

The timestamp when the deployment was initiated.

Power User Variants

Optimized versions

doctl apps create-deployment --app-id app_id --spec path/to/spec.yml

Deploy an app using a specific YAML spec for customization.

doctl apps create-deployment --app-id app_id --dry-run

Preview the deployment without executing it.

Troubleshooting

Common pitfalls

Error: app not found

Solution: Ensure the app_id is correct and exists in your DigitalOcean account.

Error: unauthorized access

Solution: Validate your access token or ensure sufficient permissions for the app.

Error: deployment already exists

Solution: Check if a deployment is already in progress for the specified app.

Command Breakdown

What each part is doing

doctl
Base Command
The executable that performs this operation. Here it runs Doctl before the shell applies any redirect operators.
a
a|apps
The value supplied for a|apps.
cd
cd|create deployment
The value supplied for cd|create deployment.
<app_id>
app id
The value supplied for app id.

Alternative Approaches

Comparable commands in other tools

Alternative cloud infrastructure tools for the same job.