Skip to content

Fix Docker dashboard embedding - #17

Merged
biancarosa merged 2 commits into
mainfrom
codex/fix-docker-dashboard
May 21, 2026
Merged

Fix Docker dashboard embedding#17
biancarosa merged 2 commits into
mainfrom
codex/fix-docker-dashboard

Conversation

@biancarosa

Copy link
Copy Markdown
Owner

Summary

  • Build the Next static dashboard inside the Docker image and embed it into the Go binary before compiling with embed_dashboard.
  • Serve embedded dashboard API calls through same-origin /api/proxy and /api/admin/* routes, with NETKIT_DASHBOARD_BASE_PATH / --dashboard-base-path support for path-based reverse proxies such as /netkit.
  • Add Docker dashboard validation so fallback HTML fails the image build and release flow.
  • Remove the dashboard's build-time Google font dependency so static export is reproducible without external font fetches.

Root Cause

The published Docker image could run a binary that served the fallback dashboard, and the frontend assumed browser-visible localhost:8080/8081 API URLs. That broke embedded Docker deployments and path-based reverse proxy setups.

Validation

  • go test ./...
  • cd dashboard && npm run build:static
  • make test-docker-dashboard
  • NETKIT_DASHBOARD_BASE_PATH=/netkit NETKIT_DOCKER_IMAGE=netkit:dashboard-validation-netkit NETKIT_DOCKER_DASHBOARD_PORT=13001 NETKIT_DOCKER_PROXY_PORT=18082 NETKIT_DOCKER_ADMIN_PORT=18083 make test-docker-dashboard

@biancarosa
biancarosa marked this pull request as ready for review May 19, 2026 23:09
@biancarosa
biancarosa merged commit b408ae1 into main May 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant