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.
| Command | What it does |
|---|---|
stechbd edge deploy | Pack this directory, upload it, and release it to production |
stechbd edge deploy:prod | The same as deploy, spelled so nobody can mistake what it does |
stechbd edge deploy:preview | Build this directory beside production, under a name, with --domain if wanted |
stechbd edge ls | List deployments, newest first, with where each went |
stechbd edge inspect | Show one deployment in full, the newest when none is named |
stechbd edge logs | Print a build’s output, following it to the end if it is still running |
stechbd edge tail | Follow what the running application prints, from now |
stechbd edge containers | List the containers behind the application, for tail --container |
stechbd edge rollback | Put an earlier production release back, the previous one by default |
stechbd edge promote | Put a preview into production, as the same artifact |
stechbd edge cancel | Stop a deployment that has not finished |
stechbd edge start | Start the application without deploying |
stechbd edge stop | Stop the application, so it serves nothing until started |
stechbd edge restart | Restart the application without deploying |
stechbd edge redeploy | Build 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.
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 askingTo test before release, build a preview with edge deploy:preview, then put that exact build live with edge promote.
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.
cd Web
stechbd link stechbd| Command | Run from | What happens |
|---|---|---|
stechbd edge deploy doc | The root | Releases doc only, after its build finishes |
stechbd edge deploy doc main | The root | Releases doc, waits for its build, then releases main. A failure stops the run with exit 1 |
stechbd edge deploy --app doc | The root | The same as naming doc. Naming it both ways is refused, and nothing is uploaded |
stechbd edge deploy --dry-run | The root | Prints the plan, deploy or skip with the reason for each, and uploads nothing |
stechbd edge deploy | The root | Changed mode: prints the plan, then deploys the applications it marks deploy. The rules are below |
stechbd edge deploy --all | The root | Changed mode, but deploys every candidate, changed or not |
stechbd edge deploy | Inside site/doc | Deploys the application whose subdirectory holds the current directory, the longest match wins. Packs the project root |
stechbd edge logs | Inside site/doc | Prints the build output of that application’s newest deployment |
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.jsonis 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.
stechbd edge deploy [<app>...] [--app <app>] [--all] [--dry-run] [--exclude <pattern>] [--git]| Option | Description |
|---|---|
<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 |
--all | With no application named in a project link, deploy every candidate, changed or not. Refused when one is named |
--dry-run | Print the plan, or the applications that would be deployed, and upload nothing |
--exclude <pattern> | An extra ignore pattern. Repeatable. Applied after the ignore files |
--git | Build from the application’s git remote instead of this directory. This is what redeploy does |
# 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 --gitstechbd 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.
stechbd edge deploy:prod [<app>...] [--app <app>] [--all] [--dry-run] [--exclude <pattern>] [--git]| Option | Description |
|---|---|
--app <app> | The application to deploy. An id, or the slug in the linked project. |
--exclude <pattern> | An extra ignore pattern. Repeatable |
--git | Build from the application’s git remote instead of this directory |
# In CI, where the target should be obvious in the job log
stechbd edge deploy:prod --gitstechbd 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.
stechbd edge deploy:preview [<app>] [--name <preview>] [--domain <hostname>] [--app <app>] [--exclude <pattern>]| Option | Description |
|---|---|
--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 |
# 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.comstechbd 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.
stechbd edge ls [--limit <n>] [--app <app>]| Option | Description |
|---|---|
--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. |
stechbd edge ls
stechbd edge ls --limit 5 --jsonstechbd 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.
stechbd edge inspect [<deployment>] [--app <app>]| Option | Description |
|---|---|
<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. |
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.
stechbd edge logs [<deployment>] [--app <app>] [--service <name>]| Option | Description |
|---|---|
<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 |
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.
stechbd edge tail [--container <id|service>] [--app <app>]| Option | Description |
|---|---|
--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. |
stechbd edge tail
stechbd edge tail --container webstechbd edge containers
Lists the containers behind the application. Use it to find the id or service name to pass to tail --container.
stechbd edge containers [--app <app>]| Option | Description |
|---|---|
--app <app> | The application whose containers are listed. An id, or the slug in the linked project. |
stechbd edge containersstechbd 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.
stechbd edge rollback [<deployment>] [--yes] [--app <app>]| Option | Description |
|---|---|
<deployment> | The release to restore, as #42 or its id. The previous release when omitted |
--yes | Skip the confirmation prompt |
--app <app> | The application to roll back. An id, or the slug in the linked project. |
# 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' --yesstechbd 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.
stechbd edge promote <deployment> [--yes] [--app <app>]| Option | Description |
|---|---|
<deployment> | The preview to promote, as #42 or its id. Required |
--yes | Skip the confirmation prompt |
--app <app> | The application to promote in. An id, or the slug in the linked project. |
stechbd edge promote '#42'
stechbd edge promote '#42' --yesstechbd 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.
stechbd edge cancel [<deployment>] [--app <app>]| Option | Description |
|---|---|
<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. |
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.
stechbd edge start [--app <app>]| Option | Description |
|---|---|
--app <app> | The application to start. An id, or the slug in the linked project. |
stechbd edge startstechbd 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.
stechbd edge stop [--yes] [--app <app>]| Option | Description |
|---|---|
--yes | Skip the confirmation prompt |
--app <app> | The application to stop. An id, or the slug in the linked project. |
stechbd edge stop
stechbd edge stop --yesstechbd 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.
stechbd edge restart [--app <app>]| Option | Description |
|---|---|
--app <app> | The application to restart. An id, or the slug in the linked project. |
stechbd edge restartstechbd 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.
stechbd edge redeploy [--app <app>]| Option | Description |
|---|---|
--app <app> | The application to rebuild. An id, or the slug in the linked project. |
stechbd edge redeploy