Repository navigation
v0.331.0 — server-restart API + Settings button
Container
ghcr.io/budgets-au/budgets:0.331.0
ghcr.io/budgets-au/budgets:latest
Added
POST /api/restart— admin-only server restart endpoint. Exits the Node process cleanly (process.exit(0)) after a 250 ms fudge factor so the JSON response flushes first. The container orchestrator (Docker / podman / k8s) relaunches when a restart policy is set —restart: unless-stoppedon the Docker side is the typical choice. Without a restart policy the container stays stopped; response body documents the expectation.- Gated by
withAdminAuth: a restart drops every live LAN session and flushes the SQLCipher key from memory, so it's a household-wide action, not a personal one. - Settings → Maintenance → Server → Restart button. New card next to the Transfer + Database sections. Confirm-dialog before the POST, spinner stays lit through the exit so the operator sees "Restarting…" until the tab loses connection and needs a manual reload.
Verify
- tsc clean,
pnpm buildclean, pages-smoke 12/12 green.
Upgrade
Pull ghcr.io/budgets-au/budgets:0.331.0 and roll. To use the endpoint outside the UI:
curl -X POST -b 'authjs.session-token=<your session cookie>' https://your-host/api/restart
Ensure your docker-compose.yml (or equivalent) declares restart: unless-stopped on the budgets service.