App Platform

You give the platform a container image; it gives you an https URL. Scaling, routing and TLS are handled for you. Apps run on Knative in the Lusaka region.

What an app is

  • Image — any container image from a public registry, or a private one with credentials. There is no build step: you push an image, we run it.
  • Port — the port your container listens on (default 8080). The platform terminates TLS and forwards to it.
  • Replicas — a minimum and maximum. Minimum 0 means the app scales to zero when idle and wakes on the first request (expect a cold start of a few seconds).
  • Size — a pricing tier; see pricing.
  • Environment variables — a name → value map. Values are returned to you later (they are configuration, not a secret store).

Create and deploy

Console: App Platform → Create app. CLI:

cloud app create web --image ghcr.io/acme/web:1.4.2 --port 3000 --min 0 --max 3 \
  --env NODE_ENV=production --wait

# private registry: the password is read from stdin, never from the command line
echo "$REGISTRY_TOKEN" | cloud app create web --image ghcr.io/acme/web:1.4.2 \
  --registry-server ghcr.io --registry-username bot --registry-password-stdin

An app's status moves from deploying to ready (or failed, with a reason). The platform's worker advances it; the console refreshes live and the CLI's --wait polls.

New versions

Deploying a new image creates a new revision; the previous one keeps serving until the new one is ready.

cloud app deploy web --image ghcr.io/acme/web:1.4.3 --wait
cloud app scale web --min 1 --max 5

Each deploy is recorded; the console shows the history with the image and outcome of each.

Logs

cloud app logs web --tail 200
cloud app logs web -f

Logs come from the running pod. An app scaled to zero has no pod; the platform wakes it and you will see a waking up line first. The console also offers a shell into a running pod.

Custom domains

Every app gets a platform URL. To use your own hostname, add it as a custom domain, then create a CNAME record at your DNS provider pointing at the target the platform shows you (it is specific to the app's region). The platform checks DNS before doing anything else and tells you exactly what to set if it is missing.

cloud app domain add web shop.example.com
cloud app domain list web

TLS on custom domains is not available yet. The domain list shows routing and TLS state separately and reports exactly what the platform knows; nothing is shown as secured until a certificate really exists. The platform URL is always https.

Delete

cloud app delete web

Deleting removes the running service, its revisions and its custom domains. The CLI asks you to type the name; pass --yes in scripts. A deleted app's name becomes available again.

When something is wrong

  • Stuck in deploying — most often the image cannot be pulled (wrong tag, or a private registry without credentials) or the container exits at start. The reason appears on the app once known; check cloud app logs.
  • Everything frozen — statuses only move while the platform worker runs. If nothing anywhere changes state, check status; the CLI's --wait will tell you when the worker is not reporting.
  • Custom domain not routing — the CNAME is missing or still propagating. cloud app domain list shows the note the platform recorded.