Skip to Content
CLI & APICommand reference

stackblaze deploy

Redeploy the linked app, or ship staged changes with --apply-pending

Usage: stackblaze deploy [options]

Redeploy the linked app, or ship staged changes with --apply-pending

Options:
  --api-url <url>        StackBlaze API base URL (env STACKBLAZE_API_URL)
  --token <token>        API token, sb_pat_... (env STACKBLAZE_TOKEN)
  -p, --project <name>   Project name
  -e, --env <name>       Environment name (default: production)
  -a, --app <name>       App name
  --json                 Output JSON (same as -o json) (default: false)
  -m, --message <text>   Release message shown in the deployments timeline
  --apply-pending        Apply every staged change (`pending list`) as ONE
                         release (default: false)
  --tag <tag>            Deploy this image tag instead (not with
                         --apply-pending)
  -o, --output <format>  Output format: text or json (choices: "text", "json")
  -h, --help             Print help

Without --apply-pending this is `redeploy` (git apps rebuild, image apps
re-pull) and warns about staged changes it is not shipping.

Examples:
  $ stackblaze variables set FOO=1 --skip-deploy
  $ stackblaze scale web=3 --skip-deploy
  $ stackblaze deploy --apply-pending -m "Bump FOO and scale up"

Example

Stage a variable and a scale change, then ship both as one release.

stackblaze variables set RELEASE_CHANNEL=beta -p github-demo-cw8z -e dev -a hello-web --skip-deploy
stackblaze scale web=2 -p github-demo-cw8z -e dev -a hello-web --skip-deploy
stackblaze deploy --apply-pending -m "Beta channel on two instances" -p github-demo-cw8z -e dev -a hello-web
OK Staged 1 change(s) for github-demo-cw8z/dev/hello-web-qw6y: RELEASE_CHANNEL
1 change(s) pending. Apply them as one release with `stackblaze pending apply` (or `stackblaze deploy --apply-pending`); drop them with `stackblaze pending discard`.
OK Staged 1 change(s) for github-demo-cw8z/dev/hello-web: scale:web
2 change(s) pending. Apply them as one release with `stackblaze pending apply` (or `stackblaze deploy --apply-pending`); drop them with `stackblaze pending discard`.
OK Applied staged changes to github-demo-cw8z/dev/hello-web-qw6y: RELEASE_CHANNEL, scale:web
One release: rolling out (config revision cmww8ehip0047wn01c2y75fn9). Follow it with `stackblaze deployments`.

On this page