arizuko

arizukocomponents › vited

vited

What it is

vited is a Vite static-file server that hands out the instance’s web tree — the docs site under /pub/, web assets, and the static pages each group publishes — sitting behind proxyd.

It is not a Go daemon and there is no vited/ package in the repo. It is a service that compose generation writes into the docker-compose file (compose/compose.go:873, the vitedService function). The container runs the arizuko-vite:latest image, which is plain Vite in dev mode serving a mounted directory. You can tell it’s Vite from any served page: it injects a /@vite/client script.

Why it exists

proxyd is a reverse proxy — it routes requests but serves no files of its own. Something behind it has to be the origin for static content. That origin is vited. In the route table, /* matches against the DB-backed web_routes table by longest prefix, and anything that doesn’t match falls through, auth-gated, to vited (ARCHITECTURE.md:131, :165).

Without vited those routes have no backend. The public docs at /pub/ would 502, group-published pages would have nowhere to come from, and the default web route would point at nothing. proxyd would still verify JWTs and sign headers, but the request would arrive at an empty seat.

How it fits

browser
        |  HTTP request for a static path
        v
      proxyd     auth check, longest-prefix route match
        |        ( /pub/* public ; default auth-gated )
        v
      vited      arizuko-vite:latest, serves the mounted dir
        ^
        |  bind mount  <data-dir>/web : /web
      <data-dir>/web/pub/   (the docs + group pages)

The config source is compose/compose.go:873 (vitedService). It writes a service named vited, container name <app>_vited_<flavor>, image arizuko-vite:latest, and one volume: the instance data dir’s web/ folder mounted at /web inside the container. There are no published ports — proxyd reaches it over the docker network — and no environment block; vited reads no arizuko config.

Vite has no /health route, so the healthcheck probes /@vite/client instead, which Vite always answers with 200 in dev mode. Inputs: HTTP from proxyd. Output: file bytes from <data-dir>/web. Hard dep: proxyd in front of it; on its own it serves files but nobody routes to it.

Standalone usage

vited is, underneath, just Vite serving a directory — so running it outside arizuko means running Vite and pointing proxyd (or any reverse proxy) at it. It is a static origin, nothing more.

Its config is generated, not hand-written. The vitedService function in compose/compose.go emits the compose block; the Vite config itself is baked into the arizuko-vite image and is not something you edit per instance. To serve a different tree, change what gets mounted at /web, not the config.

# the shape of what the container runs: Vite serving a static dir
vite --host 0.0.0.0 --port 8080
# the dir comes from the bind mount <data-dir>/web : /web

vited reads no arizuko env vars — the vitedService compose block declares no environment. See reference/env for the variables the daemons in front of and beside it use.

Go deeper