Sign inSign up

phirumseng/knetrahub-ui

By phirumseng

•Updated 2 days ago

KNetraHub UI: server-side rendering, client bundle and API proxy. No database.

Image
0

1.3K

phirumseng/knetrahub-ui repository overview

⁠phirumseng/knetrahub-ui

UI — the only service the browser talks to.

KNetraHub is a self-hosted IT operations portal: a Docker Swarm console, full-stack monitoring, work management, privileged access management, IP address management and a database workspace, behind one sign-in. It ships two ways — as a single monolith image, or as the split stack of one image per service that this image belongs to.

šŸ“– Documentation: https://sengphirum.github.io/KNetraHub/documentation⁠


⁠What this image does

Server-side rendering, the client bundle and the API proxy. Owns no business API, no database connection, no migrations and no background job — a UI deploy can only ever affect the UI.

⁠How it works

Renders pages server-side, serves the hashed client bundle, and forwards every /api/** call to the service that owns that path, using the route table in the topology rather than a hand-written proxy map. The WebSocket relay for PAM sessions passes through the same way.

⁠What it deliberately does not do

It holds no database credentials, applies no migration and runs no job — by construction, not by configuration. A UI deploy cannot change data or interrupt a queue, which is the entire reason it is a separate image.

⁠Privileges

Runs unprivileged with cap_drop: [ALL] and nothing added back, and with no database credentials at all.

⁠Which image do I want

ImageServes HTTPRuns background jobsScale it with
knetrahub-ui (this image)yesnorequest load
knetrahub-app⁠yesyesnothing — it is one process

Every split stack needs exactly one of these. Scale it with page traffic, not with API load.

⁠Settings

Read straight from the stack file that deploys this service, so the list is what the image actually takes. Optional entries ship commented out.

VariableDefault
NUXT_PUBLIC_APP_NAMEKNetraHuboptional
NUXT_PUBLIC_APP_URLhttps://knetrahub.example.comoptional
KNETRA_SERVICE_URL_TEMPLATEhttp://{service}:3000optional
KNETRA_INTERNAL_TOKEN_FILE/run/secrets/knetrahub_internal_tokenoptional
KNETRA_PROXY_TIMEOUT_MS120000optional

Anything ending in _FILE reads its value from that path instead, which is how the stack passes Docker secrets.

⁠Deploying it

This is one service of a stack, not a standalone container: it expects the portal database and its siblings on the same overlay network. Deploy it with the stack file that owns it rather than with docker run.

docker stack deploy -c docker/docker-compose.yml knetrahub

Pin a tag or a registry for this one service with KNETRAHUB_UI_IMAGE, which the stack file reads:

export KNETRAHUB_UI_IMAGE=phirumseng/knetrahub-ui:0.1.11

⁠Supported tags

  • latest — the most recent release
  • x.y.z (e.g. 0.1.11) — immutable release versions

Pin the version in production. A rollback needs a tag that does not move, and every image in the stack is released under the same version so the whole set can be pinned together.

⁠The rest of the stack

Each service is its own image, so one can be updated without restarting the others:

⁠License

Proprietary — Ā© Seng Phirum. All rights reserved.

Tag summary

Content type

Image

Digest

sha256:8591a1f76…

Size

74.3 MB

Last updated

2 days ago

docker pull phirumseng/knetrahub-ui