Scaling & pausing

Scaling and pausing

Set replicas and autoscaling, or pause an app and bring it back as it was.

stackblaze scale

Sets the replica count or autoscaling of the linked app's web and worker processes. Everything in one command is one release. Same as stackblaze apps scale.

usage
stackblaze scale [web=N] [worker=N] [--autoscale <process=min:max>]... [--autoscale-off <process>]...
stackblaze scale -r <n> [--process web|worker]

web=N and worker=N set a fixed count from 0 to 50; 0 stops that process. Replica counts are checked against your plan's per-service limit. To stop every process including cron jobs and restore it later, use down and resume.

FlagDescription
--autoscale <process=min:max>Autoscale between min and max replicas, e.g. web=2:5 (repeatable)
--autoscale-off <process>Turn off autoscaling for a process, back to a fixed count (repeatable)
--skip-deployStage the change instead of deploying it; ship it later with stackblaze pending apply
-m, --message <text>Release message shown in the deployment history
-r, --replicas <n>Replica count for --process, 0 to 50 (older single-process form)
--process <name>web (default) or worker, for -r

Also accepts the scope flags (-p, --pipeline, --phase, -a, --app) and the output flags (-o, --output, --json), plus --token and --api-url. Common flags

Examples

terminal
stackblaze scale web=3                    # 3 web replicas
stackblaze scale web=2 worker=1           # both processes, one release
stackblaze scale --autoscale web=2:5      # autoscale web between 2 and 5 replicas
stackblaze scale --autoscale-off web      # back to a fixed replica count
stackblaze scale web=4 --skip-deploy      # stage, apply later

stackblaze down

Pauses the linked app. Web, worker and cron jobs all stop, but nothing is deleted: the replica count, autoscaling settings, volumes, add-ons, variables and domains are kept, so resume brings the app back as it was.

usage
stackblaze down [-y] [-m <text>] [--build <name>]

Compute stops billing. Volumes and add-ons keep running, and billing. Builds still run while the app is paused: a git push builds a new image, but nothing starts until you resume. Visitors see a "paused by its owner" page.

If you are used to Railway: there down removes the latest deployment. stackblaze down only pauses. To delete an app, use stackblaze apps delete.

FlagDescription
-y, --yesSkip the confirmation prompt
-m, --message <text>Reason, recorded in the deployment history
--build <name>Also delete this build (see stackblaze builds list)

Also accepts the scope flags (-p, --pipeline, --phase, -a, --app) and the output flags (-o, --output, --json), plus --token and --api-url. Common flags

Examples

terminal
stackblaze down                              # asks for confirmation
stackblaze down -y -m "pausing over the weekend"

stackblaze resume

Resumes an app paused with stackblaze down. It comes back with its saved replica count or autoscaling settings and cron jobs re-enabled, running the latest built image. up --resume does the same and cannot be combined with deploy flags.

usage
stackblaze resume [-m <text>]
stackblaze up --resume
FlagDescription
-m, --message <text>Reason, recorded in the deployment history
--replicas <n>Older servers only: web replicas to restore (default 1)

Also accepts the scope flags (-p, --pipeline, --phase, -a, --app) and the output flags (-o, --output, --json), plus --token and --api-url. Common flags

Examples

terminal
stackblaze resume
stackblaze resume -p shop --phase production -a web