Deploy from a folder
Upload a folder of source from the dashboard or with wabi up, and wabi builds it in a microVM of its own.
Web services and workers can build from a folder of source you upload, from the dashboard or with the wabi CLI. Building from a folder needs a plan.
Create the service
In the dashboard, create a web service or a worker and choose Folder as its source.
| Setting | What it does |
|---|---|
| Port | where the app listens, 8080 by default; wabi sets PORT to it |
| CPU, memory, volume | the service's size (Sizes) |
| Start command | replaces the start command the build found |
| Pre-deploy command | runs before each rollout (Pre-deploy command) |
| Health path | the path the health check requests (Health checks) |
Nothing deploys until the first upload.
With the CLI, wabi link --type web (or --type worker) in the folder creates the service and links the folder to it:
npm i -g https://wabi.is/cli/wabi.tgz
wabi link --type web
wabi upUpload
From the dashboard, open the service, then drop the folder on Upload the source or choose it. From a terminal, run wabi up in the linked folder. Both pack the folder the same way and follow the build to live.
| Goes | Stays behind |
|---|---|
| every regular file under the folder | .git/, .wabi/ and .DS_Store |
what each .gitignore excludes, for its own directory and below | |
what .wabiignore excludes; it is read last, so a ! line re-includes |
The folder becomes a .tar.gz with fixed file times, owners and order, so the same folder always packs to the same bytes and the same sha256. A file that starts with #! goes in as executable, as does one the filesystem marks executable when the CLI packs it. An archive is up to 500 MB.
How wabi builds
| The folder's root holds | wabi builds with |
|---|---|
a Dockerfile | BuildKit, from that Dockerfile |
no Dockerfile | Cloud Native Buildpacks with the Paketo builder, which detects the app and builds an image without a Dockerfile |
The build fetches the archive inside its own microVM and builds only the bytes whose sha256 the upload named. It runs with the same limits, build minutes and build log as a build from GitHub (Builds run in their own microVM). Variables reach the build as secrets, and the keys you check under Build args in the service's settings also reach a Dockerfile as ARG (Variables in the build).
Uploads and your variables
A service's variables open only into the code your wallet signed (Sealed variables). For a folder service that code is the archive itself:
code: upload sha256:<hex sha256 of the .tar.gz> (<size> bytes)
build args: <keys or "none">
start: <start command or "image default">
pre-deploy: <command or "none">
volume: <path or "none">Once the service has variables, every upload of a changed folder is a new version: the dashboard or the CLI shows the archive's sha256 and size old → new, your wallet signs the next version with the same values, and the archive goes up with it. The first variables are signed after the first upload, since they name the archive they open into.
Roll back
Each deployment shows the sha256 and size of the archive it was built from. Rolling back to a deployment built from another archive signs that archive as the next version of your variables, and the service runs that build again with your current values, with nothing rebuilt. When that deployment is the newest build of its archive, it takes no rollback grant.