Skip to main content

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

FieldTypeDefaultDescription
namestringProject name (DNS-safe: lowercase letters, digits, hyphens). Required.
memorystring512MDefault VM memory for functions. Per-function overridable.
cpusnumber1Default vCPU count for functions. Per-function overridable.
publicDirstringDirectory of static files to serve (e.g. ./public, ./build).
publicBuildstringShell command to produce publicDir before deploy (e.g. npm run build).
spaModeboolServe index.html for paths that match no file or function (client-side routing).
corsobjectCORS config: origins: [ … ].
functionslistThe functions in this project (may be empty for a static-only site). Required.

Function fields

Each entry under functions::

FieldTypeDefaultDescription
namestringFunction name (DNS-safe). Output lands in .owly/build/<name>/.
langenumjs, ts, or go.
entrypointstringSource entry. JS/TS: src/<name>/index.ts; Go: src/<name>/main.go (or main.go at root for a single-function project).
pathstringHTTP path prefix routed to this function (e.g. /api/users). The handler receives the full path.
memorystringproject memoryPer-function memory override.
cpusnumberproject cpusPer-function vCPU override.
pkg_managerenumdetectednpm, yarn, or pnpm. Otherwise detected from the lockfile.
envmapEnvironment 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.