Web console (ui)¶
The ui is a static web application served by a small Node server on port
3001. It has one configuration variable.
API_URL¶
docker run -d --name axium-ui -p 3001:3001 \
-e API_URL=https://axium-api.your-domain.com/v1 \
quay.io/axiumlab/ui:latest
The URL of the core's API as seen from the user's browser. The ui injects it into the page; the browser then calls it directly. The ui container itself never talks to the core.
Rules:
- It must be reachable from wherever the users are: a public hostname, a VPN
address,
http://localhost:3000/v1on a laptop. - It must end in
/v1with no trailing slash. - An internal Docker or Kubernetes name (
http://axium-core:3000/v1) does not work, even though the ui container can resolve it. The browser cannot. - If the ui is served over
https://,API_URLmust behttps://too. Otherwise the browser blocks the requests as mixed content and the login page shows only a network error.
Same host or different hosts?¶
Both work. The core answers CORS pre-flights for any origin, so the console
can live on axium.your-domain.com while the API lives on
axium-api.your-domain.com. If you prefer a single hostname, route /v1/*
to the core and everything else to the ui at the proxy.
Health¶
The ui has no status endpoint. A 200 on / is all there is to check; the
Google Cloud updater does exactly that.
Upgrading¶
The ui consumes the core's API, so upgrade the core first, then the ui. The ui is stateless: stop it, remove it, start the new tag.