FABRIC/scripts/fabric-web.service
jedarden 43023b2596 feat(bd-ch6.4): wire FABRIC_AUTH_TOKEN end-to-end in service template
- Add EnvironmentFile=/home/coding/.config/fabric/secrets.env to
  scripts/fabric-web.service so the auth token is loaded from the
  secrets file at start (not exposed in ps aux)
- Add --otlp-http :4318 to match the deployed unit (already live)

The full auth chain is now documented in the service template:
  ~/.config/fabric/secrets.env (0600) → EnvironmentFile → server
  ~/.needle/config.yaml auth_token: "${FABRIC_AUTH_TOKEN}" → NEEDLE

POST /api/events returns 401 without token; NEEDLE workers
authenticate via Bearer token sourced from the same secrets file.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 21:26:40 -04:00

18 lines
450 B
Desktop File

[Unit]
Description=FABRIC Web Dashboard
After=network.target
[Service]
Type=simple
WorkingDirectory=/home/coding/FABRIC
ExecStart=/usr/bin/node dist/cli.js web --port 3000 --source /home/coding/.needle/logs --otlp-http :4318
Restart=always
RestartSec=5
EnvironmentFile=/home/coding/.config/fabric/secrets.env
Environment=NODE_ENV=production
StandardOutput=journal
StandardError=journal
SyslogIdentifier=fabric-web
[Install]
WantedBy=default.target