owly.yaml reference
Every Owly project has an owly.yaml at its root describing the project, its
functions, and any static files to serve.
Project fields
| Field | Type | Default | Description |
|---|---|---|---|
name | string | — | Project name (DNS-safe: lowercase letters, digits, hyphens). Required. |
memory | string | 512M | Default VM memory for functions. Per-function overridable. |
cpus | number | 1 | Default vCPU count for functions. Per-function overridable. |
publicDir | string | — | Directory of static files to serve (e.g. ./public, ./build). |
publicBuild | string | — | Shell command to produce publicDir before deploy (e.g. npm run build). |
spaMode | bool | — | Serve index.html for paths that match no file or function (client-side routing). |
cors | object | — | CORS config: origins: [ … ]. |
functions | list | — | The functions in this project (may be empty for a static-only site). Required. |
Function fields
Each entry under functions::
| Field | Type | Default | Description |
|---|---|---|---|
name | string | — | Function name (DNS-safe). Output lands in .owly/build/<name>/. |
lang | enum | — | js, ts, or go. |
entrypoint | string | — | Source entry. JS/TS: src/<name>/index.ts; Go: src/<name>/main.go (or main.go at root for a single-function project). |
path | string | — | HTTP path prefix routed to this function (e.g. /api/users). The handler receives the full path. |
memory | string | project memory | Per-function memory override. |
cpus | number | project cpus | Per-function vCPU override. |
pkg_manager | enum | detected | npm, yarn, or pnpm. Otherwise detected from the lockfile. |
env | map | — | Environment variables, injected into the VM after snapshot restore (so secrets are never baked into the immutable snapshot). |
Example: function project
name: idler
memory: 512M
cpus: 1
publicDir: ./public
publicBuild: npm run build:frontend
spaMode: true
cors:
origins:
- "*"
functions:
- name: page
lang: ts
entrypoint: src/page/index.ts
path: /api/page
env:
GAME_VERSION: "1.0.0"
- name: compute
lang: go
entrypoint: src/compute/main.go
path: /api/compute
Example: static-site-only
A project with no functions just serves files from publicDir. Scaffold it
with owly init --static:
name: my-site
publicDir: ./build
publicBuild: npm run build
spaMode: true
functions: []
functions: [] is valid and round-trips cleanly; the director serves static
files from publicDir with no function build. This is exactly how these docs
are deployed — a Docusaurus site building to ./build.
The hidden .owly/ directory
Owly keeps its build artifacts out of your source tree in a hidden .owly/
directory. Build output lives under .owly/build/ and is regenerated by
owly build, so it should be gitignored (/.owly/build/). Scaffolds set this
up for you, including the .gitignore entry.