8 Commits

Author SHA1 Message Date
Jason Staack
e1d81b40ac fix: cap NATS JetStream streams to prevent OOM crash
WIRELESS_REGISTRATIONS stream had a 256MB MaxBytes cap in a 256MB
container — guaranteed to crash under load. ALERT_EVENTS and
OPERATION_EVENTS had no byte limit at all.

- Reduce WIRELESS_REGISTRATIONS MaxBytes from 256MB to 128MB
- Add 16MB MaxBytes cap to ALERT_EVENTS and OPERATION_EVENTS
- Bump NATS container memory limit from 256MB to 384MB
- Add restart: unless-stopped to NATS in base compose
- Bump version to 9.8.2

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 07:52:07 -05:00
Jason Staack
1042319a08 perf: fix API CPU saturation at 400+ devices
Root cause: stale NATS JetStream consumers accumulated across API
restarts, causing 13+ consumers to fight over messages in a single
Python async event loop (100% CPU).

Fixes:
- Add performance indexes on devices(tenant_id, hostname),
  devices(tenant_id, status), key_access_log(tenant_id, created_at)
  — drops devices seq_scans from 402k to 6 per interval
- Remove redundant ORDER BY t.name from fleet summary SQL
  (tenant name sort is client-side, was forcing a cross-table sort)
- Bump NATS memory limit from 128MB to 256MB (was at 118/128)
- Increase dev poll interval from 60s to 120s for 400+ device fleet

The stream purge + restart brought API CPU from 100% to 0.3%.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 18:06:40 -05:00
Jason Staack
ac624fcf5f fix(setup): remove env_file from base compose to prevent .env requirement in prod 2026-03-14 10:24:26 -05:00
Jason Staack
64b3cce4b8 refactor: rename database from mikrotik to tod 2026-03-14 09:55:35 -05:00
Jason Staack
970501e453 feat: implement Remote WinBox worker, API, frontend integration, OpenBao persistence, and supporting docs 2026-03-14 09:05:14 -05:00
Jason Staack
2461582cb3 fix: use relative paths for bind-mount volumes
Absolute paths (/Volumes/ssd01/mikrotik/docker-data/) are machine-specific
and won't work on any other system. Use ./docker-data/ so the repo works
wherever it's cloned.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 20:51:33 -05:00
Jason Staack
d30df957e2 fix: rename network from 'mikrotik' to 'tod' to match overlay compose files
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 20:35:49 -05:00
Jason Staack
b840047e19 feat: The Other Dude v9.0.1 — full-featured email system
ci: add GitHub Pages deployment workflow for docs site

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 19:30:44 -05:00