Docsright arrowBlackbirdright arrowDeployment

5 min • read

Deployment

This reference provides a list of commands, arguments, and flags you can use to work with deployment instances in Blackbird.

blackbird deployment create

Description

Containerizes and deploys code to your Blackbird-hosted environment.

Required arguments

name

The name of the deployment you want to create.

Required flags

-d, --dockerfile=DOCKERFILE

The path to a Dockerfile.

-c, --context=STRING

The path to the source code directory you want to include in the image.

Optional flags

-e, --envfile=ENVFILE

The path to a .env file that contains lines of KEY=VALUE.

-p, --port=CONTAINER_PORT

The port on which the container is listening for requests. If not specified, defaults to port 80.

-n, --image-name

The name of the Docker image you want to deploy. The format must be REGISTRY/IMAGE.

--apikey-header=STRING

The name of the API key header you want to enable for this deployment.

Examples

The following example containerizes and deploys an application named "simple-api" using a Dockerfile and source code in the current directory.

The following example creates a new deployment using the NGINX Docker image provided by the --image-name flag.

blackbird deployment list

Description

Lists all deployments.

Optional Flags

-o, --output=STRING

Renders the output from the command in the requested format. Supported values include json, yaml, and table.

blackbird deployment status

Description

Shows detailed information about a deployment.

Required arguments

name

The name of the deployment for which you want to show details.

Optional flags

-l, --logs

Shows application logs for the deployment.

blackbird deployment update

Updates an existing deployment in the hosted environment.

Required arguments

name

The name of the deployment you want to update.

Required flags

-d, --dockerfile=DOCKERFILE

The path to a Dockerfile.

-c, --context=STRING

The path to the source code directory you want to include in the image.

Optional flags

-e, --envfile=ENVFILE

The path to a .env file that contains lines of KEY=VALUE.

--apikey-header=STRING

The name of the API key header you want to enable for this deployment.

Examples

The following example updates a deployment named "simple-api" using a Dockerfile named "Dockerfile" and source code in the current directory. This builds a new image and replaces the existing image in the hosted environment.

blackbird deployment delete

Removes a deployment.

Required arguments

name

The name of the deployment you want to delete.