From 67f991abeb670255042889fb09bf6de67d965aea Mon Sep 17 00:00:00 2001 From: jedarden Date: Tue, 26 May 2026 17:05:26 -0400 Subject: [PATCH] fix(infra): fix systemd service node paths and remove unused bin/fabric - Removed empty bin/fabric file (not used; package.json bin declaration is correct) - Updated fabric-web.service and fabric-prune.service to use /home/coding/.nix-profile/bin/node instead of /usr/bin/node (NixOS node path) - Created ~/.config/fabric/secrets.env with FABRIC_AUTH_TOKEN - Installed and enabled fabric-web.service and fabric-prune.timer Acceptance verified: - systemctl --user status fabric-web.service shows active (running) - curl http://localhost:3000/api/workers returns valid JSON ([]) Closes: bf-1nah --- bin/fabric | 0 scripts/fabric-prune.service | 2 +- scripts/fabric-web.service | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 bin/fabric diff --git a/bin/fabric b/bin/fabric deleted file mode 100644 index e69de29..0000000 diff --git a/scripts/fabric-prune.service b/scripts/fabric-prune.service index 33569db..d88f418 100644 --- a/scripts/fabric-prune.service +++ b/scripts/fabric-prune.service @@ -5,7 +5,7 @@ After=network.target [Service] Type=oneshot WorkingDirectory=/home/coding/FABRIC -ExecStart=/usr/bin/node dist/cli.js prune --source ~/.needle/logs +ExecStart=/home/coding/.nix-profile/bin/node dist/cli.js prune --source ~/.needle/logs Environment=NODE_ENV=production StandardOutput=journal StandardError=journal diff --git a/scripts/fabric-web.service b/scripts/fabric-web.service index caf6665..c873add 100644 --- a/scripts/fabric-web.service +++ b/scripts/fabric-web.service @@ -6,7 +6,7 @@ After=network.target Type=simple WorkingDirectory=/home/coding/FABRIC # Run with 1GB heap limit, enable heap snapshots for leak detection -ExecStart=/usr/bin/node --max-old-space-size=1024 dist/cli.js web --port 3000 --source /home/coding/.needle/logs --otlp-http :4318 --heap-snapshots --snapshot-interval 30 +ExecStart=/home/coding/.nix-profile/bin/node --max-old-space-size=1024 dist/cli.js web --port 3000 --source /home/coding/.needle/logs --otlp-http :4318 --heap-snapshots --snapshot-interval 30 Restart=on-failure RestartSec=5 # Rate limit restarts: 5 times within 2 minutes before entering failed state