Deployments & rollbacks
What triggers a build
Lifecycle
A deployment moves through PENDING → BUILDING → RUNNING, or FAILED. When a new deployment succeeds, the previous one becomes SUPERSEDED but its image is kept, which is what makes rollback instant.
Rollback
Open App services, open the service and go to its Deployments tab, pick the deployment you want to restore and choose Rollback. The platform reuses the stored image digest, so the rollback skips the build entirely.
Serverless mode (scale-to-zero)
Turn on Serverless mode from the service's Overview tab, or over the API:
curl -X PATCH "https://api.tngat.com/api/v1/apps/{{projectId}}/{{serviceName}}/serverless" \
-H "Authorization: Bearer $TNGAT_API_KEY" \
-H "content-type: application/json" \
-d '{"enabled": true}'With it on, the platform puts the service to sleep once it has been idle — no inbound or outbound network traffic and negligible CPU across rolling five-minute windows, read from Prometheus. Sleeping scales the workload to zero and marks the service STOPPED, so compute billing stops.
Sleeping is safe to leave on because a request wakes the service again: the service's ingress route carries a wake proxy (a Traefik forwardAuth pointing at the API), so the first request after a sleep starts the workload at the replica count it had before, waits up to 25 seconds for a replica to become ready, then forwards the request. The cold start is a delay, not an outage.
request → Traefik → wake proxy → replicas back up → ready → forwardTwo things to plan for. A cold start costs one request of latency (builds and heavy frameworks can exceed the 25-second window, which answers 503 — retry). And a service that keeps its own background work alive is never idle by this definition: it will stay awake, and bill, which is the correct behaviour for a worker.
Start is still available and still useful — it warms a service before traffic arrives. Every wake writes app.woke to the audit log and resumes compute billing, so a cold start is never invisible.
Logs
Build logs stream live from the build job; runtime logs stream from the pod. Both are available over the API:
curl -N "https://api.tngat.com/api/builder/deployments/{{deploymentId}}/logs/stream" \
-H "Authorization: Bearer $TNGAT_API_KEY"Exporting logs
The console's Full export button (runtime logs) and Export button (function invocation logs) download a bounded, server-side snapshot as an attachment — larger than the panel shows, and recorded in the audit log because tenant application output can be in it.
Metrics
CPU, memory and restart counts are collected per deployment and surface in the app service's Metrics tab (open the service from App services) and in the organization Usage page, where they feed the billing meter.