A Worker is either a long-running HTTP server inside an AWS Nitro Sandbox or a static site served from S3 through CloudFront with zero compute and zero cold starts.
#Runtimes
| Runtime | Flag | Entry point | Notes |
|---|---|---|---|
| Node | --runtime node | main in package.json or index.js | Node LTS, listens on PORT, NODE_ENV=production. |
| Python | --runtime python | main.py at bundle root | Python 3.14, PYTHONUNBUFFERED=1, vendor deps in .packages/ (musllinux wheels for aarch64). |
| Static binary | --runtime binary | Executable main at bundle root | Static aarch64 Linux binary (e.g., Rust aarch64-unknown-linux-musl or Go CGO_ENABLED=0 GOARCH=arm64). |
| Static site | --runtime static | Built files at bundle root | Unpacked to S3 at deploy with Brotli/gzip copies; served via CloudFront. |
#Bundle Rules & Environment
- Archives (
.tar.gz) can be up to 64 MiB compressed (512 MiB and 100,000 entries unpacked). - The bundle mounts read-only at
/app./tmpis a writable 1 GiB scratch disk cleared on every cold start. - The platform injects
PORT,MH_WORKER,MH_DEPLOYMENT,SKOPIK_BINDINGS_URL, andMH_BINDINGS_URL. - Precedence: platform variables → Worker secrets →
.envfile in bundle.
#Scaling, Memory & Warm Instances
Instances start on demand and stop after 5 minutes of idle time (open streams and WebSockets keep an instance active). You can configure memory_mib (256, 512, or 1024; default 256) and min_instances (0 to 4; default 0) to keep production warm:
skopik update_worker --worker api --memory-mib 512 --min-instances 1curl -X PATCH https://api.platform.skopik.com/v1/workers/api \
-H "Authorization: Bearer $SKOPIK_API_KEY" \
-H "content-type: application/json" \
-d '{"memory_mib": 512, "min_instances": 1}'{
"tool": "update_worker",
"arguments": { "worker": "api", "memory_mib": 512, "min_instances": 1 }
}#Immutable Deployments, Aliases & Rollback
Every deploy creates an immutable deployment with its own URL. Named aliases (production, or preview aliases like feat-login) point at a deployment:
- Deploy to a preview alias:
skopik deploy --worker api --alias feat-login - Instant rollback:
skopik rollback --worker apimoves the alias back to its previous deployment. - CDN caching: Worker responses with a cacheable
Cache-Controlheader are cached at CloudFront automatically.
#Static Sites
Deploy a built frontend directory with --runtime static:
skopik deploy --dir dist --worker web --runtime staticConfigure SPA routing, clean URLs, custom 404 pages, and per-path Cache-Control rules in skopik.json:
{
"static": {
"spa": true,
"clean_urls": true,
"not_found": "404.html",
"cache_control": [
{ "path": "/assets/*", "value": "public, max-age=31536000, immutable" }
]
}
}