feat: support external runtime state for hosting

This commit is contained in:
TopherMayor
2026-04-29 22:19:10 -07:00
parent 8f31b80647
commit 516bcd0a44
2 changed files with 20 additions and 5 deletions

View File

@@ -25,9 +25,17 @@ node server.js
Votes are stored in `data/votes.json` (created on first run). Edit directly or use the admin panel.
System seed data auto-refreshes researched package options and budget scenarios while preserving existing votes and user-added options.
For hosted deployments, set `DATA_DIR` or `DATA_FILE` so mutable vote data lives outside the Git checkout.
## Deployment
Deployed on `ice:3001` via Node.js directly (not Docker). Routed through Traefik on `ubuntu` via the `cabo-voting.local.tophermayor.com` service route.
The app can run directly under `systemd` with:
```bash
PORT=3021 DATA_DIR=/srv/state/cabo-voting node server.js
```
Traefik can then reverse proxy to the chosen host port.
See [Gitea Issues](https://gitea.tophermayor.com/TopherMayor/cabo-voting-app/issues) for the UI/UX roadmap.