feat(miner-ui): add a systemd unit for running miner-ui as a persistent service#5610
Conversation
…nt service apps/gittensory-miner-ui had no CLI subcommand or process-manager config for running it durably -- only a foreground dev server. Its vite-*-api.ts plugins already wire into configurePreviewServer as well as configureServer, so `npm run build && npm run preview` already serves the dashboard and its local-SQLite-backed data routes with no new server code needed. Adds systemd/gittensory-miner-ui.service.example as a companion unit to the existing gittensory-miner.service.example (the loop daemon), documents it in the miner-ui README, and cross-references it from the main miner's DEPLOYMENT.md bare-host walkthrough. Closes JSONbored#4852
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5610 +/- ##
=======================================
Coverage 95.01% 95.01%
=======================================
Files 574 574
Lines 45684 45684
Branches 14661 14661
=======================================
Hits 43405 43405
Misses 1528 1528
Partials 751 751
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Important 🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪 🔍 Gittensory is reviewing…AI analysis is in progress. This comment will update when the review is complete. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed · 🟪 Reviewing |
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-13 09:27:36 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 5 non-blocking
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
|
Important 🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪 🔍 Gittensory is reviewing…AI analysis is in progress. This comment will update when the review is complete. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed · 🟪 Reviewing |
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-13 09:27:45 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 5 non-blocking
Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Summary
apps/gittensory-miner-uihad no CLI subcommand or process-manager config for running it durably — only a foreground dev server (npm run dev).vite-ledgers-api.ts/vite-portfolio-queue-api.ts/vite-run-state-api.tsplugins already wire their local-SQLite-backed API routes into bothconfigureServer(dev) andconfigurePreviewServer(preview), sonpm run build && npm run previewalready serves the built dashboard and its data routes with no new server code needed.systemd/gittensory-miner-ui.service.example, a companion unit to the existinggittensory-miner.service.example(the loop daemon) — mirrors its structure/comment style closely (Type=simple,Restart=on-failure, non-rootUser=, no--hostsince the dashboard has no auth of its own — this is separate from and unaffected by the new same-origin cookie auth on/api/*from feat(miner-ui): require a same-origin session cookie on the local API #5605).apps/gittensory-miner-ui/README.md's new "Running as a persistent service" section, and cross-references it from the main miner'sDEPLOYMENT.mdbare-host walkthrough.(Re-opening after #5607 was auto-closed by an unrelated, transient CI failure:
ui:version-auditcaught the repo's hardcoded npm dist-tag lagging one patch behind a real@loopover/mcppublish. That's since been fixed onmainby #5609; this branch is rebased on top of it and the audit now passes locally.)Test plan
test/unit/miner-ui-systemd-launcher.test.ts: asserts the unit file has every required systemd directive ([Unit]/[Service]/[Install],Type=simple,ExecStart,WorkingDirectory,User,Restart=on-failure,WantedBy); assertsExecStarttargets the real@loopover/ui-minerworkspace name read live from itspackage.json(not a hardcoded/stale name); asserts no--hostflag; asserts the README and DEPLOYMENT.md cross-references exist.npm run typecheckpasses.npm run docs:drift-checkpasses.npm run ui:version-auditpasses.test/unit/miner-deployment-docs-audit.test.ts(the DEPLOYMENT.md accuracy audit) passes.Closes #4852