You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The frontend container currently uses a Python entrypoint that regex-replaces hardcoded default URLs baked into the JS bundle at build time (frontend-entrypoint.py). This is fragile and blocks:
Helm/k8s deployment (Helm charts + MicroK8s deployment path #62): ConfigMaps and Secrets inject env vars into the container environment — they cannot reach into baked JS strings.
.NET Aspire integration: Aspire's service discovery injects service URLs at orchestration time via env vars — same problem.
Our own frontend build: We need our own image anyway (HoldFast branding, remove Highlight.io references). The upstream image + patch is explicitly a temporary workaround.
Solution
Implement a proper runtime config injection pattern:
Build the frontend with placeholder/empty values for all service URLs
Add a lightweight entrypoint script (bash or Node) that generates /build/env.js at container startup from actual env vars
index.html loads env.js before the bundle — sets window.__env__
App code reads window.__env__.REACT_APP_PRIVATE_GRAPH_URI (falling back to import.meta.env for local dev)
This makes the frontend a proper 12-factor app — all configuration via env vars, no runtime string replacement.
Scope
Update src/frontend to read from window.__env__ with import.meta.env fallback
New infra/docker/frontend-holdfast.Dockerfile that builds from source
Replace frontend-entrypoint.py with a clean bash entrypoint that writes env.js
Update compose.hobby-dotnet.yml to build from source
HoldFast branding pass (remove Highlight.io references from UI)
Problem
The frontend container currently uses a Python entrypoint that regex-replaces hardcoded default URLs baked into the JS bundle at build time (
frontend-entrypoint.py). This is fragile and blocks:Solution
Implement a proper runtime config injection pattern:
/build/env.jsat container startup from actual env varsindex.htmlloadsenv.jsbefore the bundle — setswindow.__env__window.__env__.REACT_APP_PRIVATE_GRAPH_URI(falling back toimport.meta.envfor local dev)This makes the frontend a proper 12-factor app — all configuration via env vars, no runtime string replacement.
Scope
src/frontendto read fromwindow.__env__withimport.meta.envfallbackinfra/docker/frontend-holdfast.Dockerfilethat builds from sourcefrontend-entrypoint.pywith a clean bash entrypoint that writesenv.jscompose.hobby-dotnet.ymlto build from sourceDependencies