vilice deploy
Deploy an app from a digest-pinned image.
operate recorded before it runs
vilice deploy — Deploy an app from a digest-pinned image
Brings up the new container alongside the one already serving, polls it
until it answers healthy, and only then moves traffic across. If it
never answers, the old app is left running and the deploy fails — a
bad image costs you an error message, not an outage.
The image that was serving is remembered as last-good, so vilice
rollback is always available.
Images are digest-pinned (ref@sha256:…). A tag is refused, because a
tag is not a thing you can redeploy: it means something different
tomorrow, and "the image that was running" has to be an answer.
The flags cover the common app. Anything with env, secrets, or volumes
sends its desired state on stdin instead, as an envelope of two halves:
{"app": {…the spec…}, "secret_values": {"NAME": "value"}}
The app half is the desired state, and it replaces the old one
wholesale — what you send is what runs, and a field you leave out is
removed. It is recorded, by digest.
The secret_values half is not recorded: values arrive here so they
never touch the command line. The spec declares its secrets by name
only, and every name it declares needs a value on every deploy — a
missing one is refused rather than carried over from last time.
Usage:
vilice deploy <app> --image <ref> [--port <n>] [--hostname <host>]
vilice deploy <app> < envelope.json (env, secrets, volumes)
Flags:
--image <ref> The image to run, pinned by digest: ref@sha256:…
Required.
--port <n> Port the app listens on inside the container. Default
8080.
--hostname <host> Public hostname Caddy routes to this app.
--health <path> Path polled until it answers 200. Default /.
Examples:
Deploy and route a straightforward web app.
vilice deploy blog --image ghcr.io/me/blog@sha256:ab12… \
--hostname blog.example.com
Send the whole envelope: env, secrets, volumes, backup hook.
vilice deploy blog < envelope.json
Scope: operate — reachable by an operate or grant key
Record: written before the command runs