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
- Create deployment with pre-built Docker image
- Monitor deployment status until active
Command Syntax
Examples
Deploy a Docker image
Deploy to production environment
Deploy with keyspace authentication
Deploy with custom branch metadata
Arguments
| Argument | Description |
|---|---|
<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