mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2308] [CLOSED] docker: complete deployment bundle with a management console #3974
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3974
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/2308
Author: @jazzlee008
Created: 10/13/2026
Status: ❌ Closed
Base:
main← Head:pr/docker-bundle📝 Commits (10+)
d8592dedocker: add a complete deployment bundle with a management consoleb4d6bccdocker: add a complete deployment bundle with a management consolef602b57docker: add a complete deployment bundle with a management consoleeb0a9dcdocker: add a complete deployment bundle with a management console6eaefe0docker: add a complete deployment bundle with a management console497d150docker: add a complete deployment bundle with a management console78e47c3docker: add a complete deployment bundle with a management consolef320fdddocker: add a complete deployment bundle with a management console20b6118docker: add a complete deployment bundle with a management consoled911be6docker: add a complete deployment bundle with a management console📊 Changes
26 files changed (+3445 additions, -0 deletions)
View changed files
➕
docker/.dockerignore(+27 -0)➕
docker/.env.example(+53 -0)➕
docker/.gitattributes(+8 -0)➕
docker/.gitignore(+20 -0)➕
docker/CONTRIBUTING.md(+112 -0)➕
docker/Dockerfile(+119 -0)➕
docker/Dockerfile.nginx(+5 -0)➕
docker/README.md(+328 -0)➕
docker/certs/.gitkeep(+0 -0)➕
docker/docker-compose.yml(+106 -0)➕
docker/docker-entrypoint.sh(+106 -0)➕
docker/manager/Dockerfile(+24 -0)➕
docker/manager/app.py(+1046 -0)➕
docker/manager/requirements.txt(+4 -0)➕
docker/manager/static/addon-fit.min.js(+8 -0)➕
docker/manager/static/index.html(+797 -0)➕
docker/manager/static/uPlot.min.css(+1 -0)➕
docker/manager/static/uPlot.min.js(+2 -0)➕
docker/manager/static/xterm.css(+218 -0)➕
docker/manager/static/xterm.min.js(+8 -0)...and 6 more files
📄 Description
Summary
Adds
docker/— a self-contained deployment bundle for Strata: the engineimage, an nginx TLS + authorization entry point, and a FastAPI manager serving
a monitoring console and recording inference metrics.
The upstream repo already ships a root-level
Dockerfileanddocker-entrypoint.shfor a single inference container. This adds the piecesaround it that a shared or long-running deployment needs: a gateway that
terminates TLS and checks credentials, a manager that exposes metrics and
lets you manage keys, and a Compose file that wires the three together.
What's included
Only
nginxpublishes a host port.managerandstrataare reachable on theinternal network only, so the engine never depends on its own authorization.
The stack
nginxauth_requestauthorization, SSE and WebSocket forwardingmanagerstrataDesign notes worth reviewing
The build context is assembled by a script. The engine Dockerfile contains
COPY . ., so a build needs the full source tree. Pointing the build context atthe repository root would also send sibling secrets (TLS private keys, API key
files) to the Docker daemon, even though they are never copied into the image.
scripts/prepare-build.shcopies the sources plus this directory's Dockerfileinto a clean
.build-context/, so the context never contains credentials.The console is bilingual. English by default; Chinese when the browser asks
for it; a header button overrides the choice. Runtime-generated strings go
through
t(), the rest are translated by walking the DOM on load.node tests/i18n-coverage.jsbuilds a DOM from the realindex.html, runsapplyLang(), and fails if any Chinese text survives — it currently reports 0.WebSockets authorize themselves.
/ws/deliberately bypasses nginxauth_request: the subrequest does not inherit the original query string, so?api_key=(the only way a browser can carry a credential on a WebSocket)cannot be verified at that layer. The manager's WebSocket endpoints check the
session cookie or the query parameter instead.
Shell access is opt-in. The terminal tab does not connect on load; it
requires an explicit click on Connect, shows a status indicator, and
disconnecting terminates the shell session.
This Dockerfile tracks the upstream one. Same build logic, with two local
adjustments: China-friendly apt/PyPI mirrors, and removal of the
# syntaxdirective (it makes BuildKit fetch a frontend image from docker.io). Both are
easy to drop; CONTRIBUTING.md documents how to re-sync from upstream.
Verification
Built and run on an RTX 4090 (24 GB) with
IQ3_S, 256K context, visionenabled:
docker compose config— cleandocker compose up -d --build— all three containers reachhealthy/api/*and/v1/*→ 401; UI shell,/healthopennode tests/i18n-coverage.js→ 0 untranslated stringsKnown limitations
Happy to take feedback on any of these:
command auditing, session timeouts and a non-root user are not implemented.
engine's design, not something the bundle introduces.
SAMPLE_INTERVAL).mounting an externally issued certificate would be a natural next step.
prepare-build.shis a shell script. It could be amaketarget or aCompose-native mechanism if the project prefers.
Files
README.md— user-facing documentationCONTRIBUTING.md— checklist, conventions, known limitations, upstream sync🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.