skiff.toml reference
Every setting an app deployed with skiff deploy can have.
skiff deploy reads skiff.toml from the folder you run it in. Only name is required.
name = "shop-api"
replicas = 2
[server]
host = "root@203.0.113.10"
[build]
port = 3000
[deploy]
release = "npm run migrate"
health_path = "/healthz"
[resources]
memory = "512m"
cpu = "0.5"
[env]
LOG_LEVEL = "info"
[secrets]
STRIPE_KEY = "sk_live_..."
[[volumes]]
name = "uploads"
path = "/app/uploads"
[[workers]]
name = "queue"
command = "node queue.js"
replicas = 2
[[jobs]]
name = "report"
schedule = "0 3 * * *"
command = "node report.js"Top level
| Key | Default | What it does |
|---|---|---|
name | required | The app's name, and its address: <name>.<your domain>. |
replicas | 1 | How many copies of the app run. Each must pass its health check before the old version stops. |
[server]
| Key | Default | What it does |
|---|---|---|
host | none | The server to deploy to over SSH, like root@203.0.113.10. Leave [server] out to deploy to Docker on this machine. |
[build]
| Key | Default | What it does |
|---|---|---|
dockerfile | Dockerfile | The Dockerfile to build from. |
target | the last stage | The Dockerfile stage to build, like runtime. |
args | none | Build arguments for the Dockerfile's ARG lines, like args = { MODE = "prod" }. They end up in the image's history, so keep secrets in [secrets]. |
port | 8080 | The port the app listens on. With image set and no port, the port the image exposes is used. |
image | none | A prebuilt image to deploy instead of building, like ghcr.io/you/api:1.4. See Prebuilt images. |
base, install, build, start, static | none | Build steps for an app with no Dockerfile. Setting start or static skips detection and builds from these instead. |
[deploy]
| Key | Default | What it does |
|---|---|---|
release | none | A command run once before the new version goes live, such as migrations. If it fails, the deploy stops and the old version keeps serving. |
health_path | none | A path that must answer 2xx or 3xx before the new version takes traffic, like /healthz. Without it, any reply at / counts. |
health_timeout | 30 | Seconds the new version has to become healthy, from 5 to 1800. A model server loading a large model may need minutes. |
health_mode | HTTP | tcp accepts any open port, for services that don't speak HTTP. none skips the check, for a service with no port. |
drain_timeout | 300 | Seconds the replaced version may keep finishing open requests, up to 3600. 0 stops it straight away. |
network | skiff | The Docker network the app joins to reach databases by name. |
aliases | none | Extra names other services on the network can reach the app by. |
command | the image's | A list that replaces the image's default command, like ["node", "server.js"]. |
udp_port | none | A UDP port the app listens on, published so the router can forward it. Open it to the internet as a Public UDP port in the project's Settings. |
isolation | standard | "strong" runs the app under gVisor's sandbox, for code you don't fully trust. See isolation. |
egress, egress_allow | anywhere | Where the app may connect: "private" for the team's own services only, or "list" with egress_allow = ["api.openai.com"]. See outbound network. |
cap_add, devices, sysctls, privileged, host_network, new_privileges | none | Machine permissions, like cap_add = ["NET_ADMIN"] and devices = ["/dev/net/tun"]. See machine permissions. |
[resources]
| Key | Default | What it does |
|---|---|---|
memory | 75% of the server | Memory each replica may use, like 512m or 2g, at least 16m. |
cpu | no limit | CPU cores each replica may use, like 0.5 or 2. |
gpus | none | How many of the server's NVIDIA GPUs the app gets, up to 16. See GPUs. |
Workers, scheduled jobs and the release command run with the same limits as the app.
[env] and [secrets]
[env] sets environment variables at build time and when the app runs. [secrets] sets them only when the app runs, so they never end up in the image. A .env file beside skiff.toml is read too, and [env] wins where both set a variable.
If you're signed in with skiff login, variables set in the dashboard are added wherever skiff.toml doesn't set them.
[[volumes]]
Directories that keep their files across deploys, up to 5 per app. See Persistent volumes.
| Key | What it does |
|---|---|
name | 1 to 32 lowercase letters, digits or dashes. |
path | Where it's mounted, an absolute path like /data. |
also | More paths to mount the same volume at, like ["/var/cache"]. They share its files. |
[[workers]]
Long-running processes from the app's build, such as a queue consumer. Each deploy restarts them on the new version.
| Key | What it does |
|---|---|
name | 1 to 32 lowercase letters, digits or dashes. |
command | What it runs, through sh -c. |
replicas | How many copies run, from 1 to 10. The default is 1. |
[[jobs]]
Commands from the app's build that run on a schedule. The dashboard runs them, so they need Skiff's dashboard on the server.
| Key | What it does |
|---|---|
name | 1 to 32 lowercase letters, digits or dashes. |
schedule | Cron syntax in the server's time zone, like 0 3 * * * for 3am every day. |
command | What it runs, through sh -c. |
timeout | How long a run may take, from 1m to 168h (a week). Default 30m. A run past it is stopped. |
retries | How many more times a failed run is tried, up to 10. Default 0. |
catch_up | "skip" drops runs missed while Skiff wasn't running. Left out, a missed job runs once when Skiff is back. |
webhook | true gives the job an address that starts it when a signed request arrives. The dashboard shows the address and its secret. |
bucket | One of your team's buckets. Each new file in it starts a run. |
prefix | Only new files under this folder of the bucket, like incoming/. |
steps | A pipeline instead of command: [[jobs.steps]] tables with name, command and after, a list of the steps it waits for. See steps. |
A job needs at least one of schedule, webhook or bucket, and either command or steps.
For an app deployed this way, skiff.toml decides its workers and jobs, so the dashboard and the API can't change them. Running a job now still works.