feat(miner): add a systemd bare-host service example for the miner loop - #5350
Conversation
Add systemd/gittensory-miner.service.example so an operator can run the miner continuously on a plain Linux host without Docker -- the non-Docker counterpart to DEPLOYMENT.md's fleet-mode docker-compose invocation. Because `gittensory-miner loop` (JSONbored#5135) is a long-running daemon that schedules its own cycles, this is a persistent Type=simple service with Restart=on-failure, not a oneshot unit + .timer (contrast the periodic gittensory-docker-prune.*.example). Adds a "Bare-host (systemd, no Docker)" section to DEPLOYMENT.md pointing at it. Template/docs only; no runtime logic touched. Closes JSONbored#5197
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-12 14:44:41 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 6 non-blocking
Linked issue satisfactionPartially addressed 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 🟩 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.
|
Adds a systemd unit example so an operator can run the miner continuously on a plain Linux host without Docker — the non-Docker counterpart to DEPLOYMENT.md's fleet-mode docker-compose invocation, which was the only continuous-run path documented until now.
What this adds
systemd/gittensory-miner.service.example— a ready-to-adapt unit that supervisesgittensory-miner loop, with an install-steps header mirroring the existinggittensory-docker-prune.*.example.packages/gittensory-miner/DEPLOYMENT.mdpointing at it.Run model (the issue's requirement 1)
Determined from the code:
gittensory-miner loop(bin/gittensory-miner.js→lib/loop-cli.js) is a long-running daemon (#5135) that schedules its own discover → attempt → manage cycles internally. So this is a persistentType=simpleservice withRestart=on-failure— not a oneshot unit fired by a.timer, which is the right shape only for a genuine periodic batch like the existinggittensory-docker-prunejob. The file header and DEPLOYMENT.md both call out that distinction.Secrets guidance:
GITHUB_TOKEN(and any coding-agent credentials) go in a root-owned0600EnvironmentFile, never in the unit file.systemctl stopsends SIGTERM, which the loop handles at its next kill-switch check.Validation
docs:drift-check,check-miner-package,git diff --check: all clean. Rebased onto latest main.Closes #5197