lakehouse/ops/systemd/lakehouse-context7-bridge.service
profit c85c55006d
Some checks failed
lakehouse/auditor 3 warnings — see review
ops: systemd units for auditor + context7 bridge
Promotes two previously manual-start Bun services to systemd
so they survive restarts + run continuously.

- ops/systemd/lakehouse-auditor.service — polls Gitea every 90s,
  runs 4 audit checks per PR head SHA, posts commit status + review
  comment. Runs as root to match existing lakehouse-* service
  conventions on this host; can read /home/profit/.git-credentials
  (0600 profit:profit).
- ops/systemd/lakehouse-context7-bridge.service — HTTP wrapper on
  :3900 for Phase 45 doc-drift detection. Decoupled from gateway;
  runs independently.
- ops/systemd/install.sh — idempotent installer (copy → daemon-reload
  → enable --now). Prints post-install active/enabled status.
- ops/systemd/README.md — run/stop/logs/pause docs.

Pause control stays per-service (bot.paused / auditor.paused files
at repo root). Not wired to branch protection yet — the auditor's
commit status is currently advisory, not enforcing. Flip via Gitea
branch_protections API when confident.
2026-04-22 04:15:58 -05:00

24 lines
869 B
Desktop File

[Unit]
Description=Lakehouse context7 HTTP bridge — doc-version lookups for Phase 45 drift detection
Documentation=file:///home/profit/lakehouse/mcp-server/context7_bridge.ts
After=network.target
# No hard dependency on gateway — the bridge is self-contained and
# talks to context7.com directly. Gateway calls INTO the bridge
# during drift checks but they're decoupled.
[Service]
Type=simple
WorkingDirectory=/home/profit/lakehouse
ExecStart=/home/profit/.bun/bin/bun run /home/profit/lakehouse/mcp-server/context7_bridge.ts
Restart=on-failure
RestartSec=15
# Default port :3900 (overridable via CONTEXT7_BRIDGE_PORT env).
# If the user moves the bridge to a different port, update the
# LH_BRIDGE_URL env on lakehouse.service + auditor.service too.
Environment=CONTEXT7_BRIDGE_PORT=3900
KillSignal=SIGTERM
TimeoutStopSec=5
[Install]
WantedBy=multi-user.target