Apps
An app is a container image that Velrix keeps running. Your first app deploys one; this page is about living with it. Its page has a head that says how it is doing, and tabs: Overview, Variables, Volumes, Deployments, Console, Logs and Settings, with more when other parts of Velrix add their own.
How it is doing
The status says it in one word, and on the Cockpit board with a mark:
- Healthy, with a beating heart: it runs and every running copy passes its health check.
- Starting: until every running copy passes.
- Unhealthy, with a cracked heart: a copy fails its check.
- Running: it runs and has no health check.
- Sleeping, with a moon: it stopped because nobody asked for it (see Sleep when idle).
- Offline: nothing runs.
The head also shows the app’s first hostname, the zone of the server it runs on and how many copies it runs. An app that may not reach the internet says No internet access there (see Internet access).
Overview lists recent events in sentences, such as who changed the variables, and when.
Deployments
Every change that alters what runs is a revision: a new image, a variables deploy, a resize. The Deployments tab shows the one that is live as a card: the commit’s first line, its author and time, where it came from, the last word of the rollout, and View logs. Its menu has Restart, Redeploy and Remove. With nothing live, it says No active deployment and offers to deploy.
Below it is the history, each revision Active, Deploying, Failed, Rolled back, Removed or Skipped. Hide skipped tidies it.
A revision opens on its own page:
- Details: the outcome and the phases it went through, where it came from, what changed, its variables, and its configuration, readable or as
velrix.jsonor TOML to copy. - Build logs for a revision built by CI, Deploy logs and Network logs over its time.
Rollouts without downtime
A new revision of a container app starts as an extra copy beside the ones that run. Velrix waits until the new copy is up, passes its health check and is served by its hostnames, then replaces the old copies one at a time, each judged the same way. As many copies run as you asked for all along, so a one-copy app has no gap either.
If a new copy fails to start, crashes or fails its check, the revision fails and rolls back: only copies that took the new revision go back, and the extra copy goes. Copies the rollout never reached are left untouched.
Two kinds restart in place instead, stopping before they start: a VM, and an app whose volume only one copy may mount. The revision says so.
A copy that leaves is drained first: it stops getting new requests, and the ones in flight finish. While old and new copies both serve, a visitor stays on one of them, so a page and its scripts and styles always come from the same build.
The same applies when you change the size, the variables or the health check: the change rolls out copy by copy, as one revision.
Variables
The Variables tab holds what the app starts with. Seal secrets: a sealed value is encrypted, never shown again, and only the container sees it.
Staged changes
Changes don’t run until you deploy them. Each edit is staged: the row is tinted and says New, Changed or Deleted, the Cockpit card reads Edited · 3 changes, and a bar over every tab of the app says Apply 3 changes, with Discard, Details and Deploy (Shift+Enter). Deploy applies them all at once as one revision, whose number the app reads as VELRIX_REVISION.
Paste variables takes a .env file or a JSON object, staged row by row. Beside the list, the same variables can be copied as ENV or JSON; sealed ones are left out.
References
A value can name another app’s variable or a shared one, and is resolved when you deploy:
postgres://app:${{app:db.PASSWORD}}@${{app:db.INTERNAL_HOST}}:5432/app
${{app:<name>.VAR}}: another app of the same owner, by name or id.VARmay be one of its variables or one Velrix provides, such asINTERNAL_HOST.${{shared.VAR}}: a shared variable (below).
A reference that goes round in a circle, or names something that is not there, is refused with its name, and nothing changes. A reference to a sealed value is sealed in the app that reads it. You need the right to manage the app you read from.
Shared variables
Shared variables belong to the owner or the project, and any app there can read them as ${{shared.NAME}}. Make shared on a row moves an app’s own variable there and leaves a reference behind. Each shared variable lists the apps that use it; one in use is not removed. Changing one stages the change in every app that reads it, so each deploys when its people say so.
Generated secrets
A value of ${{ secret(32) }} is made when it is first deployed: 32 letters and digits, or the characters you give, such as ${{ secret(24, "abcdef0123456789") }}. It is kept on every deploy after, until you change the text. Generator in the row’s menu writes it for you.
Provided by Velrix
Every container also gets VELRIX_APP_ID, VELRIX_APP_NAME, VELRIX_INTERNAL_HOST and VELRIX_INTERNAL_URL (its name on the project network), VELRIX_REVISION, VELRIX_COMMIT, and the zone and region of its server. A variable of your own with the same name wins.
Settings
One Settings tab holds everything else, a section each, with a filter at the top (/ jumps to it): Source and Build when the owner has a Git server, Deploy, Health, Hostnames, Protocols, Scale, Policies, and Delete last. A field the repository’s velrix.json sets says Set in velrix.json and is changed there (Git).
Replicas
Scale also sets how many copies of the app run, one by default. Copies go on different servers where there are several, and each has its own address, health and metrics. Scaling up and down happens at once; the first copy always stays. A copy whose server goes quiet, or that keeps failing there, starts on another server by itself.
Only container apps without a volume run more than one copy: a volume lives on one server, so an app with one stays at one copy. VMs have one copy.
Resize
Scale has the app’s size: pick another from the catalogue, or Custom where your operator allows it, then Resize. The size is checked as at create, and against the servers the app runs on: they need the memory it grows by and the cores it asks for. The app is never moved for a resize. Every copy restarts with the new size, as one revision, so a rollback puts the old size back too.
Sleep when idle
Turn on Sleep when idle in Scale and choose the idle minutes (10 by default). When nobody has asked for the app for that long, it stops, and the next request wakes it:
- Requests that arrive while it wakes wait, up to 30 seconds and up to 100 at a time. Past either, they get a page saying the app is waking, and are asked to try again in a few seconds.
- The app’s page says how long the last wake took, so you can judge it.
- Nothing is billed while it sleeps. A volume stays attached.
- A deploy while it sleeps changes what runs next; the next wake runs it.
Requests to its hostnames wake it, over HTTP/1.1, HTTP/2 or HTTP/3, and so does a connection to its load balancer port: the first connection waits for it to start, and an open TCP session keeps it awake. A call from another app on the project network does not: keep Sleep off for an app reached that way. VMs don’t sleep.
GPUs
Where your operator has servers with GPUs, the catalogue has sizes with one or more GPUs, and an app of such a size gets them to itself: a GPU belongs to one owner at a time. How many GPUs one app may have is a policy your operator sets.
Hostnames and HTTP/3
Hostnames gives the app its names. A name must be under a domain its owner has proved: you prove a domain once, under Domains in your account or on your organisation’s Edge tab, and then use names under it in any app (Domains and DNS). Each name gets its certificate by itself and answers HTTP/3, HTTP/2 and HTTP/1.1, with nothing to configure: HTTP/3 is on for every app, and the sites on Velrix Public Cloud, this one included, are served that way. WebSockets work over HTTP/1.1.
- HTTPS record: Hostnames shows the DNS record to set for each name, so browsers use HTTP/3 from their first visit. Without it, they move to HTTP/3 after the first answer.
- Certificates: a name that does not point at the realm yet says Waiting for DNS to point here, and its certificate is ordered as soon as it does.
- Redirects here: names that send visitors to one of the app’s names, with path and query kept (308 by default; 301, 302 or 307 if you choose).
- Access: who may open the names. Anyone; Anyone signed in to this realm; or Only those named below: people, organisations and projects. Visitors then sign in at your realm’s own sign-in page first. A wildcard name can’t be protected.
- Health path: the path each copy is asked, every 15 seconds or so. 2xx or 3xx is up. A copy that fails a request outright is taken out at once and asked again within seconds.
- Warm paths: pages each new copy is asked for, with every hostname, before it gets visitors, so its caches are full when the first one arrives. A warm path that does not answer 2xx or 3xx keeps the copy out, and the revision rolls back. Up to 32;
deploy.warmPathsinvelrix.jsonsets them too. - Compression: scripts, styles and fonts go out compressed (Brotli or gzip) as the browser asks. Also pages and JSON compresses those too; leave it off for pages that show what a visitor typed next to a secret.
- Edge pipeline: the steps every request passes through on its way to the app: rules that rewrite headers, redirect or answer, a response cache, compression, error pages and Velrix Access. Turn steps on or off and order them (Edge cache and admission control).
When Velrix itself has to answer, because no copy is up, the app is starting or a visitor is not let in, the page shows where it broke, from the visitor through the realm to the app, with a request ID to quote.
Apps never publish ports on a server. Web traffic goes through hostnames; for other TCP or UDP, such as SSH, put a load balancer or a floating IP in front of the app (Floating IPs and load balancers).
Protocols
Settings › Protocols says what the app speaks and on which port inside the container: https on port 3000, ssh on 2222, minecraft 1.20–1.21 on 25565. Each is a protocol by name with a range of versions, such as >= 1.1 or 1.20-1.21 (empty takes every version), and optionally the names it is for. Whoever carries the traffic follows it: the edge ends HTTPS and serves HTTP/3, 2 and 1.1; other protocols pass through to the app on a shared port by name, or on a port of their own.
An app with hostnames and no protocol is served as https on port 80. Your operator’s list of protocols, with each one’s ports and versions, is in the add menu; operators add their own in the Manager.
Internet access
An app on a project network reaches the internet only when its owner allows it, and it is off until then. The app’s head says No internet access, and Settings has an Internet access line with the switch, for whoever may manage the owner’s networks.
Console
The Console tab is a terminal in the running container above a file browser of it. Drag the border between them to share the room. With several copies, a menu picks which copy both follow. In the file browser you can open and download a file, and drop files in. A terminal keeps running when you switch tabs. VMs have their own console on the machine’s page.
Logs
The Logs tab is one view of everything the app said, with live tail, search and download. A chip for each kind it has lines in chooses what you see: Output, the HTTP requests to its hostnames, and its own DNS lookups and network flows when your operator logs those for its network.
- Filters: type
@for the fields of the chosen kinds, such as@status:5*,@level:erroror@domain:*.example.com, beside free words. All of them must match. A filter no chosen kind can match is underlined and says why. - Errors have a red edge. A stack trace after a warning or an error, a printed error object too, is one entry, folded to its first line.
- DNS lines say what a name resolved to.
- Columns chooses the columns for each kind, and local time or UTC.
Deploy from your own Git
Run Forgejo as an app from the Library, connect it under Git servers (Git), and the app’s Settings gain Source and Build:
- Source: the server, repository, branch and image to deploy. Deploys when pushed turns it on or off; Wait for CI deploys only after the commit’s CI run succeeded. The image name may use
{sha},{short}or{branch}. - Build: the Containerfile’s path and build-time variables, sealed and handed to the CI build.
People sign in to Forgejo with their Velrix account, and organisation members join its teams. CI runs as Velrix jobs, each in its own microVM, and the output reaches Forgejo while it runs. Each run gets a registry key that can push only to the repositories its commit’s rules name, and to their build cache: layers are kept in the registry between runs, so a build whose dependencies have not changed reuses them. In our tests, a build with a 200 MB dependency step took 20 seconds cold and 9 seconds with the cache.
Each deploy is a revision like any other, rolled out without downtime and rolled back if it fails, with the commit, its author and the CI run on its page. Git over SSH goes through a load balancer; HTTPS clone and push work through the app’s hostname.
As code
Everything here is an API call under https://<realm>/api/, documented in your realm’s Docs window (The API reference in your realm). An API key made with a whole capability, such as all of compute, follows releases: when a new release adds to that capability, the key gains it, and its page says Gained 2 rights from a new release. A key made with single events or read-only access never widens.