Adds dashboards/tracker-web/launchd/ (boot script + install.sh + README) so tracker-web (:3003) auto-starts on login and restarts on crash/reboot, instead of dying silently between sessions. Mirrors agent-queue/launchd: boot script repairs PATH, loads JWT_SECRET from platform-service/.env (+ ~/.tracker-web.env overrides), points at the local platform-service, and execs `pnpm dev`. plist uses unconditional KeepAlive (restart on any exit, incl. a clean SIGTERM) + a 10s throttle; install.sh frees :3003 first to avoid a clash with deploy-gigafactory. Verified: killing the process respawns it and :3003 returns. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
38 lines
1.7 KiB
Markdown
38 lines
1.7 KiB
Markdown
# tracker-web LaunchAgent (keep-alive on :3003)
|
|
|
|
Auto-starts the fleet **web tracker** (`tracker-web`) on login and restarts it on
|
|
crash/reboot, so `http://localhost:3003` stays up without a babysitter. Mirrors
|
|
the `agent-queue/launchd/` pattern in `learning_ai_devops_tools`.
|
|
|
|
## Files
|
|
|
|
- `tracker-web-boot.sh` — boot entrypoint: repairs `PATH`, loads `JWT_SECRET` (+
|
|
co.) from `../../services/platform-service/.env` and optional
|
|
`~/.tracker-web.env` overrides, points the app at the local platform-service
|
|
(`PLATFORM_API_URL`, default `http://localhost:4003`), then `exec pnpm dev`.
|
|
- `install.sh` — renders `~/Library/LaunchAgents/com.bytelyst.tracker-web.plist`
|
|
(`RunAtLoad` + unconditional `KeepAlive` so it restarts on any exit, incl. a
|
|
clean SIGTERM, + a 10s crash-loop throttle), frees `:3003` if something else is
|
|
on it, then bootstraps + kickstarts it.
|
|
|
|
## Use
|
|
|
|
```bash
|
|
bash launchd/install.sh # install + start
|
|
bash launchd/install.sh --uninstall # stop + remove
|
|
|
|
tail -f ~/Library/Logs/tracker-web/tracker-web.out.log # logs
|
|
launchctl print gui/$(id -u)/com.bytelyst.tracker-web | sed -n '1,20p' # status
|
|
```
|
|
|
|
## Notes
|
|
|
|
- **Prereqs:** the platform-service backend on `:4003` (see
|
|
`learning_ai_devops_tools/scripts/deploy-gigafactory.sh`) and `pnpm` on `PATH`.
|
|
- **Don't double-manage the port:** while this LaunchAgent owns `:3003`, do not
|
|
also run `deploy-gigafactory.sh --with-tracker` / `--tracker-only` — they would
|
|
clash on `:3003`. Use one or the other.
|
|
- **Per-machine overrides:** drop env in `~/.tracker-web.env` (not tracked) to
|
|
override `PLATFORM_API_URL`, `DEFAULT_PRODUCT_ID`, etc.
|
|
- macOS only (LaunchAgents). On Linux use a `systemd --user` unit.
|