Unkey

Deploy

Deploy a pre-built Docker image to Unkey infrastructure

Deploy a pre-built Docker image to Unkey infrastructure.

The deploy command handles the deployment lifecycle: from creating a deployment to monitoring its status until it's ready. It automatically detects your Git context for metadata.

Deployment Process

  1. Create deployment with pre-built Docker image
  2. Monitor deployment status until active

Command Syntax

unkey deploy <docker-image> [flags]

Examples

Deploy a Docker image

unkey deploy ghcr.io/user/app:v1.0.0 --project-id=proj_123

Deploy to production environment

unkey deploy myregistry.io/app:latest --project-id=proj_123 --env=production

Deploy with keyspace authentication

unkey deploy ghcr.io/user/app:v1.0.0 --project-id=proj_123 --keyspace-id=ks_abc123

Deploy with custom branch metadata

unkey deploy ghcr.io/user/app:v1.0.0 --project-id=proj_123 --branch=feature-branch

Arguments

ArgumentDescription
<docker-image>Docker image reference to deploy (required). Example: ghcr.io/user/app:v1.0.0

Flags

--project-id

Project ID (required)

  • Type: string
  • Environment: UNKEY_PROJECT_ID

--keyspace-id

Keyspace ID for API key authentication

  • Type: string
  • Environment: UNKEY_KEYSPACE_ID

--branch

Git branch metadata

  • Type: string
  • Default: "main" (auto-detected from git if available)

--commit

Git commit SHA metadata

  • Type: string
  • Default: auto-detected from git if available

--env

Environment slug to deploy to

  • Type: string
  • Default: "preview"

--root-key

Root key for authentication

  • Type: string
  • Environment: UNKEY_ROOT_KEY

--api-base-url

API base URL (for local testing)

  • Type: string
  • Environment: UNKEY_API_BASE_URL

On this page