feat(deploy): systemd user unit + install script for membershipd
Add deploy/unibus-membershipd.service (Restart=always, binds both planes to 0.0.0.0 for LAN reachability), an idempotent deploy/install.sh that builds the binary, symlinks the unit, and enables+starts it, plus deploy/README.md with operate/health instructions. Restart=always is deliberate: a clean SIGTERM exits 0 and Restart=on-failure would not restart it, leaving the service silently dead (the sqlite_api gotcha). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
[Unit]
|
||||
Description=unibus membershipd — control plane (rooms, keys, blobs) + embedded NATS/JetStream
|
||||
Documentation=https://gitea-dgg044oo04woo4ggcsws4gk0.organic-machine.com/dataforge/unibus
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=%h/fn_registry/projects/message_bus/apps/unibus
|
||||
# --bind 0.0.0.0 exposes BOTH the HTTP control plane (:8470) and the embedded
|
||||
# NATS data plane (:4250) to the LAN so phones / other PCs can connect.
|
||||
ExecStart=%h/fn_registry/projects/message_bus/apps/unibus/membershipd --bind 0.0.0.0
|
||||
# Restart=always (NOT on-failure): a clean SIGTERM shutdown exits 0, and
|
||||
# on-failure would then NOT restart, leaving the service silently dead. always
|
||||
# brings it back regardless of exit code. See .claude/rules/function_tags.md.
|
||||
Restart=always
|
||||
RestartSec=2
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
Reference in New Issue
Block a user