Openspec ontsloten via web interface voor gebruik door informatie analisten. vlam.ai als model leverancier.
  • Shell 50.4%
  • Dockerfile 49.6%
Find a file
Mark van Dijk bda4740dfb Add OpenShift container for OpenSpec and OpenSpecUI
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-11-24 09:37:18 +01:00
openshift Add OpenShift container for OpenSpec and OpenSpecUI 2026-11-24 09:37:18 +01:00
.dockerignore Add OpenShift container for OpenSpec and OpenSpecUI 2026-11-24 09:37:18 +01:00
.gitattributes Add OpenShift container for OpenSpec and OpenSpecUI 2026-11-24 09:37:18 +01:00
Dockerfile Add OpenShift container for OpenSpec and OpenSpecUI 2026-11-24 09:37:18 +01:00
entrypoint.sh Add OpenShift container for OpenSpec and OpenSpecUI 2026-11-24 09:37:18 +01:00
README.md Add OpenShift container for OpenSpec and OpenSpecUI 2026-11-24 09:37:18 +01:00

OpenSpec + OpenSpecUI on OpenShift

Container image running the OpenSpec CLI and OpenSpecUI web UI, so an information analyst can work on specifications from a browser. Git is the source of truth; no database is used.

Versions and compatibility

Component npm package Pinned
OpenSpec CLI @fission-ai/openspec ~1.17
OpenSpecUI openspecui ^17

OpenSpecUI 17 only accepts CLI >=1.17.0 <1.18.0. The npm latest CLI (2.x) is blocked by the UI, so both are pinned to a matching line. To upgrade, check the compatibility table in the openspecui README, then build with --build-arg OPENSPEC_VERSION=… --build-arg OPENSPECUI_VERSION=….

Base image: node:22-bookworm-slim (glibc; the UI uses native modules with glibc prebuilds).

Files

File Purpose
Dockerfile, .dockerignore, entrypoint.sh Image and startup script
openshift/pvc.yaml PersistentVolumeClaim for /workspace
openshift/secret.example.yaml Secret example (VLAM_API_KEY)
openshift/deployment.yaml, service.yaml, route.yaml Workload, Service (3100), TLS Route

Environment variables

Variable Required Description
VLAM_API_KEY yes (for AI) API key for the VLAM provider. Supply via Secret.
VLAM_BASE_URL no OpenAI-compatible endpoint, e.g. https://vlam-api.overheid-i.nl/v1
VLAM_MODEL no Model name, e.g. vlam-code-vast
GIT_REPO_URL recommended Spec repository, cloned to /workspace/repo on first start
GIT_BRANCH no Branch to clone
GIT_USERNAME, GIT_TOKEN no HTTPS credentials for a private repo (Secret)
GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL no Identity for commits made in the UI terminal
OPENSPECUI_PASSWORD no Enables the UI access gate with a shared password (Secret)
PORT no Listen port, default 3100

Note: OpenSpecUI does not read VLAM_API_KEY itself (it has no built-in VLAM support). The key and VLAM_* settings are exported into the process environment, so tools started from the UI's terminal (e.g. an AI coding agent configured for the VLAM endpoint) can use them.

Build

podman build -t openspec:latest .      # or: docker build -t openspec:latest .

Run locally

podman run --rm -p 3100:3100 \
  -e VLAM_API_KEY=... \
  -e GIT_REPO_URL=https://git.example.com/org/specs.git \
  -v openspec-workspace:/workspace \
  --user 12345:0 \
  openspec:latest

Open http://localhost:3100. Health: http://localhost:3100/api/health. --user 12345:0 simulates the arbitrary UID OpenShift assigns.

Deploy to OpenShift

oc new-project openspec
oc new-build --name openspec --binary --strategy docker
oc start-build openspec --from-dir=. --follow        # or push a locally built image

oc create secret generic openspec-secrets --from-literal=VLAM_API_KEY='<key>'
oc apply -f openshift/pvc.yaml

# edit image, GIT_REPO_URL in openshift/deployment.yaml first
oc apply -f openshift/deployment.yaml -f openshift/service.yaml -f openshift/route.yaml
oc get route openspec

The pod runs with the namespace's default restricted SCC: non-root, arbitrary UID in group 0, no privilege escalation, all capabilities dropped. No custom SCC is needed.

Volume mount

/workspace is the only writable location and must be a PersistentVolume:

  • /workspace/repo – the cloned specification repository (OpenSpec project).
  • /workspace/.home – HOME (git config, UI/tool state) so it survives restarts.

On first start the repo is cloned; afterwards the existing working copy is kept, including uncommitted work. Commit and push from the UI terminal – anything not pushed lives only on the PVC. The volume is ReadWriteOnce, so run a single replica (Recreate strategy).

Health

OpenSpecUI serves GET /api/health. It is used for the Deployment startup/readiness/liveness probes and the image HEALTHCHECK.

Security notes

  • The UI includes a terminal and file editor with no user accounts. Anyone who can reach the Route can run commands in the pod (and read VLAM_API_KEY). Restrict access (NetworkPolicy, internal-only Route/IP allow-list, or OAuth proxy), and/or set OPENSPECUI_PASSWORD in the Secret. Note the password is passed as a process argument inside the pod.
  • Keep the Route TLS-terminated (edge, redirect enabled).

Verification status

Written without a container engine available in the authoring environment, so the image has not been built or run yet. Verified from upstream sources: package names/versions, compatibility window, serve --no-open --port, /api/health, default port 3100. To confirm after first build: UI reachable on all interfaces, openspec --version is 1.17.x, works with --user 12345:0.