Repository navigation
ADFA-4839: dashboard packaging — compiled JS, loopback bind, supervision, dev push - #254
Merged
Merged
Conversation
…ion, dev push Phase 2 hardening of the in-server dashboard. - Run compiled JS: tsconfig outDir=dist + 'build'/'start' scripts; dash-node service now runs 'node dist/server.js' (was 'npx ts-node server.ts') with a respawn supervisor (auto-restart on crash, PID-tracked so stop ends the loop cleanly) and a 'health' probe (GET /api/kiwix/jobs). Bootstrap runs 'yarn build' after install. - Resolve views/public via process.cwd() (the service cd's into /library/dashboard) so paths hold once __dirname is .../dist. - Bind the server to 127.0.0.1: nginx already proxies from loopback, so :4000 no longer needs to listen on the device's network interfaces (closes network-reachable :4000). - tools/dev-push-dashboard.sh: push static/dashboard into an installed rootfs + rebuild + restart, for iterating without the ~2h rootfs rebuild (tar excludes node_modules/dist). Compile validated (tsc emits dist cleanly). Runtime under plain node (native better-sqlite3), the supervisor stop/health shell paths, and the provisioning 'yarn build' need on-device verification in the rebuild.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 2 hardening of the in-server dashboard (ADFA-4832). Batched into the single Phase 2 rootfs rebuild alongside ADFA-4838.
tsconfigoutDir=dist+build/startscripts; thedash-nodepdsm service now runsnode dist/server.js(wasnpx ts-node server.ts) with a respawn supervisor (auto-restart on crash, PID-tracked sostopends the loop cleanly before killing the server) and ahealthprobe (GET /api/kiwix/jobs). The bootstrap runsyarn buildafteryarn install.process.cwd()(the servicecd's into/library/dashboard), so they hold once__dirnamebecomes.../dist.127.0.0.1— nginx already proxies from loopback, so:4000no longer listens on the device's network interfaces (closes the network-reachable:4000).tools/dev-push-dashboard.shcopiesstatic/dashboardinto an installed rootfs, rebuilds and restarts — iterate without the ~2h rebuild (tar excludesnode_modules/distso the nativebetter-sqlite3isn't clobbered).Validation: TypeScript compile confirmed (
tscemitsdist/cleanly, no test files leaked). Not runnable in the sandbox (nativebetter-sqlite3won't build here), so the runtime under plainnode, the supervisor stop/health shell paths, and the provisioningyarn buildstep need on-device verification in the rebuild (or via the dev-push script).