S Technologies's Logo

Color

Green
Teal
Indigo
Blue
Purple
Red
Rose

Mode

Light

Edge

Deploy, follow and manage front ends: static sites and SSR applications, billed on the edge service.

stechbd edge is the group for front ends, meaning static sites and server-rendered applications. It packs the directory, uploads it, builds it, and releases it. stechbd compute runs the same pipeline for everything else, and is billed differently. Every command accepts --app <app> to name the application, by its id or its slug in the linked project, --json for machine output, --quiet to suppress progress, and --help.

CommandWhat it does
stechbd edge deployPack this directory, upload it, and release it to production
stechbd edge deploy:prodThe same as deploy, spelled so nobody can mistake what it does
stechbd edge deploy:previewBuild this directory beside production, under a name, with --domain if wanted
stechbd edge lsList deployments, newest first, with where each went
stechbd edge inspectShow one deployment in full, the newest when none is named
stechbd edge logsPrint a build’s output, following it to the end if it is still running
stechbd edge tailFollow what the running application prints, from now
stechbd edge containersList the containers behind the application, for tail --container
stechbd edge rollbackPut an earlier production release back, the previous one by default
stechbd edge promotePut a preview into production, as the same artifact
stechbd edge cancelStop a deployment that has not finished
stechbd edge startStart the application without deploying
stechbd edge stopStop the application, so it serves nothing until started
stechbd edge restartRestart the application without deploying
stechbd edge redeployBuild the application’s git remote again, uploading nothing

Quick start

Link the directory once, then deploy, follow the build, and check what went live. Roll back if the release is wrong.

bash
stechbd project link <project> <app>   # once per directory, creates .stechbd/
stechbd edge deploy                    # ship the working tree to production
stechbd edge logs                      # follow the build to its end
stechbd edge ls                        # list deployments
stechbd edge rollback                  # put the previous release back, after asking

To test before release, build a preview with edge deploy:preview, then put that exact build live with edge promote.

bash
stechbd edge deploy:preview --name review
stechbd edge promote '#42'

Monorepos

A repository that holds several applications is linked once, at its root, to the project. Each application names the subdirectory it is built from, set with stechbd app update --subdirectory <path>, for example site/doc. The upload is always the folder that holds .stechbd/ when the application has a subdirectory, because the panel builds the subdirectory from inside the upload. A deploy run from inside site/doc therefore still sends the whole project.

bash
cd Web
stechbd link stechbd
CommandRun fromWhat happens
stechbd edge deploy docThe rootReleases doc only, after its build finishes
stechbd edge deploy doc mainThe rootReleases doc, waits for its build, then releases main. A failure stops the run with exit 1
stechbd edge deploy --app docThe rootThe same as naming doc. Naming it both ways is refused, and nothing is uploaded
stechbd edge deploy --dry-runThe rootPrints the plan, deploy or skip with the reason for each, and uploads nothing
stechbd edge deployThe rootChanged mode: prints the plan, then deploys the applications it marks deploy. The rules are below
stechbd edge deploy --allThe rootChanged mode, but deploys every candidate, changed or not
stechbd edge deployInside site/docDeploys the application whose subdirectory holds the current directory, the longest match wins. Packs the project root
stechbd edge logsInside site/docPrints the build output of that application’s newest deployment
bash
cd Web
stechbd link stechbd
stechbd edge deploy doc
stechbd edge deploy doc main
stechbd edge deploy --dry-run
stechbd edge deploy
stechbd edge deploy --all
cd site/doc
stechbd edge deploy
stechbd edge logs
  • Changed mode compares the working tree with the commit recorded for each application in .stechbd/deployed.json. Uncommitted and untracked files count.
  • A change under an application’s subdirectory deploys that application.
  • A change outside every subdirectory, such as a lockfile or a shared packages/ folder, deploys every candidate. Markdown files are the exception.
  • An application with no record, or whose recorded commit git no longer has, is deployed, and the plan says why.
  • Edge takes the frontend applications and compute takes the rest. Only applications uploaded from the project are considered. An application with no subdirectory is skipped, because nothing says which files belong to it.
  • Deploys run one at a time, each waiting for its build. The first failure stops the run with exit 1. deployed.json is written after each successful build, never after a failed one.

stechbd edge deploy

Packs this directory and releases it to production. Use it when the working tree is what should go live. The directory is checked before anything is uploaded: the application must be linked, the panel must accept uploads, and the name and hostname must be valid. Files matched by .gitignore and .stechbdignore are not uploaded. Several applications can be named, as positionals or with --app, but not both; they are deployed one after another, each waiting for its build. In a directory linked to a project with no application named, the changed applications are deployed instead. See Monorepos.

bash
stechbd edge deploy [<app>...] [--app <app>] [--all] [--dry-run] [--exclude <pattern>] [--git]
OptionDescription
<app>...The applications to deploy, by id or slug in the linked project. Several may be named, deployed in order
--app <app>An application to deploy, by id or slug. Not needed in a directory linked with project link. Cannot be combined with positionals
--allWith no application named in a project link, deploy every candidate, changed or not. Refused when one is named
--dry-runPrint the plan, or the applications that would be deployed, and upload nothing
--exclude <pattern>An extra ignore pattern. Repeatable. Applied after the ignore files
--gitBuild from the application’s git remote instead of this directory. This is what redeploy does
bash
# Release the working tree to production
stechbd edge deploy

# Leave out a directory that should not be uploaded
stechbd edge deploy --exclude "coverage/**"

# Build the last pushed commit instead of the working tree
stechbd edge deploy --git

stechbd edge deploy:prod

Runs the same release as deploy, with the same options. The separate name exists so a script or a reviewer can see that production is the target. Use it in pipelines where that should be explicit. It takes the same application names as deploy, including --all and --dry-run.

bash
stechbd edge deploy:prod [<app>...] [--app <app>] [--all] [--dry-run] [--exclude <pattern>] [--git]
OptionDescription
--app <app>The application to deploy. An id, or the slug in the linked project.
--exclude <pattern>An extra ignore pattern. Repeatable
--gitBuild from the application’s git remote instead of this directory
bash
# In CI, where the target should be obvious in the job log
stechbd edge deploy:prod --git

stechbd edge deploy:preview

Builds this directory as a preview, beside production, and does not touch production. The preview is named after the current git branch unless --name is given. --domain puts a hostname of your own in front of the preview. Use it to test a change at its own address before promoting it.

bash
stechbd edge deploy:preview [<app>] [--name <preview>] [--domain <hostname>] [--app <app>] [--exclude <pattern>]
OptionDescription
--name <preview>The preview’s name. Defaults to the current git branch
--domain <hostname>A hostname to serve this preview on
--app <app>The application to deploy. An id, or the slug in the linked project.
--exclude <pattern>An extra ignore pattern. Repeatable
bash
# Preview the current branch
stechbd edge deploy:preview

# Preview under a name, on a hostname of your own
stechbd edge deploy:preview --name review --domain review.example.com

stechbd edge ls

Lists deployments, newest first, with the target each one went to. Use it to find a deployment name for inspect, logs, promote or rollback.

bash
stechbd edge ls [--limit <n>] [--app <app>]
OptionDescription
--limit <n>How many deployments to list, a whole number from 1 to 100
--app <app>The application to list. An id, or the slug in the linked project.
bash
stechbd edge ls
stechbd edge ls --limit 5 --json

stechbd edge inspect

Shows one deployment in full. The newest deployment is shown when none is named. Use it to check a deployment before promoting or rolling back to it.

bash
stechbd edge inspect [<deployment>] [--app <app>]
OptionDescription
<deployment>A deployment, as #42 or its id. The newest when omitted
--app <app>The application that owns the deployment. An id, or the slug in the linked project.
bash
stechbd edge inspect
stechbd edge inspect '#42'

stechbd edge logs

Prints a build’s output. If the build is still running, the command follows it to the end. It exits 1 when the build failed, so it can gate a script. Use it right after deploy to watch the release.

bash
stechbd edge logs [<deployment>] [--app <app>] [--service <name>]
OptionDescription
<deployment>A deployment, as #42 or its id. The newest when omitted
--app <app>The application that owns the deployment. An id, or the slug in the linked project.
--service <name>Only the output of one service of the deployment
bash
stechbd edge logs
stechbd edge logs '#42'

stechbd edge tail

Follows what the running application prints, starting now. It shows runtime output rather than build output, so use it to watch requests and errors after a release. --container narrows it to one container, by id or by service name.

bash
stechbd edge tail [--container <id|service>] [--app <app>]
OptionDescription
--container <id|service>One container, by its id or by its service name
--app <app>The application to follow. An id, or the slug in the linked project.
bash
stechbd edge tail
stechbd edge tail --container web

stechbd edge containers

Lists the containers behind the application. Use it to find the id or service name to pass to tail --container.

bash
stechbd edge containers [--app <app>]
OptionDescription
--app <app>The application whose containers are listed. An id, or the slug in the linked project.
bash
stechbd edge containers

stechbd edge rollback

Puts an earlier production release back into production. With no argument it picks the release before the live one, and the confirmation names it by number. Previews are never chosen as a rollback target. The panel refuses a rollback it cannot honour before it changes anything, and that refusal is printed as given.

bash
stechbd edge rollback [<deployment>] [--yes] [--app <app>]
OptionDescription
<deployment>The release to restore, as #42 or its id. The previous release when omitted
--yesSkip the confirmation prompt
--app <app>The application to roll back. An id, or the slug in the linked project.
bash
# Roll back to the previous release, after confirming it
stechbd edge rollback

# Roll back to a named release, without a prompt
stechbd edge rollback '#41' --yes

stechbd edge promote

Puts a preview into production, as the same build that was tested. The deployment is required, because there is no obvious preview to choose, so the command never picks one for you.

bash
stechbd edge promote <deployment> [--yes] [--app <app>]
OptionDescription
<deployment>The preview to promote, as #42 or its id. Required
--yesSkip the confirmation prompt
--app <app>The application to promote in. An id, or the slug in the linked project.
bash
stechbd edge promote '#42'
stechbd edge promote '#42' --yes

stechbd edge cancel

Stops a deployment that has not finished. It cancels the newest deployment when none is named. Some engines cannot stop a build that has already started, so a cancelled deployment can still be running upstream. The panel’s notice is printed when it sends one.

bash
stechbd edge cancel [<deployment>] [--app <app>]
OptionDescription
<deployment>The deployment to cancel, as #42 or its id. The newest when omitted
--app <app>The application that owns the deployment. An id, or the slug in the linked project.
bash
stechbd edge cancel '#42'

stechbd edge start

Starts the application without deploying anything. Use it after a stop, or when the application is not running and the current release should be.

bash
stechbd edge start [--app <app>]
OptionDescription
--app <app>The application to start. An id, or the slug in the linked project.
bash
stechbd edge start

stechbd edge stop

Stops the application. It serves nothing until start. The output shows both the desired and the observed state, because the engine can take a moment to agree with a stop request.

bash
stechbd edge stop [--yes] [--app <app>]
OptionDescription
--yesSkip the confirmation prompt
--app <app>The application to stop. An id, or the slug in the linked project.
bash
stechbd edge stop
stechbd edge stop --yes

stechbd edge restart

Restarts the running application without deploying. Use it when the process is wedged but the release is correct. It does not ask for confirmation.

bash
stechbd edge restart [--app <app>]
OptionDescription
--app <app>The application to restart. An id, or the slug in the linked project.
bash
stechbd edge restart

stechbd edge redeploy

Builds the application’s git remote again. Nothing is uploaded from this directory, so the build is whatever the remote holds. Use it to rebuild after a change in the remote, or when the same source should be built again.

bash
stechbd edge redeploy [--app <app>]
OptionDescription
--app <app>The application to rebuild. An id, or the slug in the linked project.
bash
stechbd edge redeploy