Live server apps
How a server app in any language is built, started from its Procfile, sized, health-checked, released with no gap, and rolled back.
oalo deploy --app api --env prod (or Launch in the dashboard) puts one
commit of a server app live. Oalo:
- Builds an image of that commit, away from your workspace (see "How the image is built" below).
- Runs the Procfile's
releaseline once, if there is one (migrations, say). If it fails, nothing changes: the live app stays as it was. - Starts every Procfile process in its own container:
web, which must listen on$PORT, and each other line as a worker. With no Procfile,webis the language's usual start (npm startfor Node). - Waits for
webto answer HTTP on$PORT, up to a minute, while the previous release keeps serving. Then the live address moves to the new one and the old containers stop. If the new one crashes or never answers, it's removed and the old one keeps serving; the deploy reports its last log lines.
Every release is kept by commit (oalo deploy --history), and
oalo deploy --rollback makes an earlier one live again. It is built again
(an identical earlier build is reused when nothing it depends on changed), with
today's variables, and swaps over once it answers, like any live deploy.
Rolling back again goes further back; it never returns to a release you rolled
back from.
A live process that crashes later is restarted on its own. oalo logs --env prod keeps showing its output across restarts (with a line saying it exited),
and oalo apps names a process that isn't running.
A new release that breaks goes back on its own. In its first 15 minutes
live, a release that stops answering for 3 checks in a row, or restarts 3
times, is rolled back to the release before it (the one oalo deploy --rollback would pick), and everyone on the workspace is told: when it
starts and when the earlier release is live again. Each release is rolled
back once at most, and a release that was itself an automatic rollback never
is, so it can't loop. Fix it and deploy again. To turn it off for an app, add
"auto_rollback": false to .oalo/app.json.
The preview (oalo deploy, dev) runs the Procfile's release line too,
before it restarts, so it starts on its schema. If the preview doesn't answer,
or release fails, the deploy says so and exits 1; your code is saved either
way.
How the image is built
The first of these that fits the commit:
- The repo's own
Dockerfile, at its root. Any language or stack. - Oalo's Dockerfile for the runtime, when the repo has none: Bun
(
bun.lockorbun.lockb), Elixir, Phoenix or Plug (mix.exs), Rust (Cargo.toml), Deno (deno.json), or a Dart server, Shelf or Dart Frog (pubspec.yaml, compiled to one native binary). You don't need to know Docker.oalo dockerfileprints the one used, andoalo dockerfile --writesaves it as./Dockerfileto change; once committed, the repo's copy is used. - Buildpacks, found from the repo: Node (
package.json), Python (requirements.txtorpyproject.toml), Ruby (Gemfile), Go (go.mod), Java, Kotlin or Scala (pom.xml, Gradle orbuild.sbt), PHP (composer.json) or .NET (a project file). A Node app needs its lockfile committed (package-lock.json,yarn.lockorpnpm-lock.yaml); the build says so if it's missing.
The deploy's log says which one it used.
Previews by language
Every language above goes live, and every one has a preview (dev-<app>,
after a plain oalo deploy): the app's dev server in that language's
toolchain, restarted on each deploy. Without a Procfile web: line it starts
the usual way:
| Language | Install | Start |
|---|---|---|
| Node, Bun | the repo's package manager | dev (else start) script, or the entry file |
| Python | pip into .venv | uvicorn (main.py), Flask (app.py), Django (manage.py) |
| Go | go mod download | go run . |
| Ruby | bundle install | rails server, rackup (config.ru), or ruby app.rb |
| PHP | composer install | php artisan serve, or php -S on public/ or the root |
| Java, Kotlin, Scala | fetched as it starts | Spring Boot (Maven or Gradle, the repo's wrapper first), Gradle run, or sbt run |
| .NET | dotnet restore | dotnet run |
| Elixir | mix deps.get | mix phx.server, or mix run --no-halt |
| Rust | cargo fetch | cargo run |
| Dart | dart pub get | a Dart Frog app built and its server run, or dart run bin/server.dart |
| Deno | deno install | the dev or start task, or main.ts (watched) |
- Listen on 0.0.0.0 and
$PORT. The preview runs in a container, so a server bound to 127.0.0.1 can't be reached. Spring Boot getsSERVER_PORTand ASP.NET CoreASPNETCORE_URLSset for it; a Phoenix app needsip: {0, 0, 0, 0}in its dev config's endpointhttp. - Package caches last between previews, per app.
- An app built only from a Dockerfile (no language Oalo recognizes) has
no preview:
oalo deploy --env prodbuilds and runs it live.
A server language's own file decides what kind of app a repo is, even with
a package.json beside it for assets (Rails, Laravel, Phoenix). An app
imported before Oalo knew its language (shown as code only) becomes a
server app on its next oalo deploy.
What an image must do
Whatever builds it, the image runs the same way:
- It serves HTTP on
$PORT. Read the port from the environment. - It runs as uid 1000, with a read-only filesystem.
/tmpis writable; keep anything that must last in the database. - It's built for arm64. Most base images have an arm64 version (all the official ones do).
- No privileges: no Docker inside it, no host folders, no root-only system calls.
With a Dockerfile, the Procfile still names the processes. web runs the
image's own ENTRYPOINT and CMD, or the Procfile's web: line when there
is one; each other line (a worker, release) runs through /bin/sh. The
app's public prod variables reach the build as build arguments (ARG NAME); secrets never do.
A Phoenix app also needs SECRET_KEY_BASE: run mix phx.gen.secret, then
oalo env set SECRET_KEY_BASE --secret --env prod.
Sizes
Each process gets a size from .oalo/app.json, committed in the repo. The
same file names the variables the app needs and a health path:
{
"sizes": { "web": "small", "worker": "medium" },
"health": "/healthz",
"env": { "required": ["STRIPE_KEY"], "optional": ["SENTRY_DSN"] }
}
sizes: per Procfile process, for the live app.health: a path onwebthat answers 2xx or 3xx once the app is ready. A release goes live only when it does. Without it, any HTTP answer on/is enough, whatever its status.env.required: a live deploy is refused until each is set for prod (oalo env set NAME --env prod); a dev deploy names the ones dev lacks.tools(endpoints a bot can call) are in the same file: see app tools.
Every key is optional, and a key Oalo doesn't read is refused, so a typo can't pass for a setting.
| Size | CPUs | Memory |
|---|---|---|
tiny | 0.25 | 512 MB |
small (the default) | 0.5 | 1 GB |
medium | 1 | 2 GB |
large | 2 | 4 GB |
Memory is a hard limit: a process that goes over it is restarted. The sizes
come from the commit being launched, so a rollback brings its own back. All
apps on a workspace share a set part of its capacity, and a launch that
wouldn't fit is refused with a reason. Bigger sizes (xlarge, 2xlarge) and
more than one copy of a process aren't available yet.
These sizes are for the live app. A preview's size comes from its language
(medium for JVM, .NET and Rust, small for the rest).
Uptime and incidents
Oalo checks each live app every minute. For a server app: whether its web
process answers HTTP on its port (or answers .oalo/app.json's health path
with a 2xx or 3xx, when it names one), and how often each process was
restarted. For a web app served as files (React, Flutter, Expo or Figma
builds): whether its live build is there to serve, with its index.html.
- An incident opens when the app hasn't answered for 3 checks in a row ("isn't answering"), or its processes restarted 3 times in 10 minutes ("keeps restarting", even if it answers in between). It closes after 2 good checks in a row and 10 minutes without a restart.
- It says what was seen, not a guess: which process, how many restarts,
the exit code, the log's last lines, and a memory kill with the size it
had and the fix (a bigger size in
.oalo/app.json). - Everyone on the workspace is told when one opens and when the app is back: in the dashboard's bell, and by email even while they're on the dashboard. Each person can turn either off under Notifications.
oalo incidents --app apilists them;oalo appsmarks an app with one open; the app's Logs tab in the dashboard shows them.
What the app gets
- Variables: every
prodvariable set withoalo env, secrets included, when its containers start, plusPORT,DATABASE_URL(a login every server app in the workspace shares, through the connection pooler: see the app's database),APP_SCHEMA=prod,OALO_ENV=prod, andOALO_URLandOALO_SYNC_TOKENfor calling Oalo. The build sees only the public ones. See App environment variables. - Network: the internet, and its database. Oalo's API is reached at
OALO_URLlike any public address; the workspace's internal services and other apps' containers are not reachable. - Paths: every path on the app's address is the app's (
/api,/live,/checkoutand the rest), except two Oalo keeps: anything under/_oalo/andPOST /chat/bootstrap(the chat widget's start). - What it can use from Oalo: events into workflows (App events), workflows as functions (Calling a workflow), its endpoints as bot tools (App tools) and a chat widget signed in as its users (Chat widget).
- Disk: the image is read-only; write temporary files under
/tmp. Keep anything that must last in the database. - Logs:
oalo logs --app api --env prod, per process.
The kinds of app you can host on Oalo, how to create one, preview versus production URLs, what comes built in, and how a native mobile build ships.
Give an app its API keys and settings with oalo env, per env: what is secret, what each kind of app gets, its own token and database, and when changes apply.
Read and write your workspace's data from your own server over HTTP: rows, environments, tokens, bulk writes, the live stream, limits, and mirroring.
Sign up, install the CLI, and deploy your repo in a few minutes.