postgres uptime
This commit is contained in:
@@ -67,6 +67,22 @@ API_RATE_LIMIT_WINDOW_MS=60000
|
||||
API_RATE_LIMIT_MAX=120
|
||||
```
|
||||
|
||||
## Uptime snapshots
|
||||
|
||||
The production server samples uptime every 30 minutes and exposes the history at
|
||||
`/api/uptime`. Set `DATABASE_URL` or `UPTIME_DATABASE_URL` to persist snapshots
|
||||
in Postgres:
|
||||
|
||||
```sh
|
||||
DATABASE_URL=postgres://user:password@127.0.0.1:5432/tssbot
|
||||
UPTIME_SAMPLE_INTERVAL_MS=1800000
|
||||
UPTIME_HISTORY_LIMIT=336
|
||||
```
|
||||
|
||||
The server creates the `uptime_snapshots` table automatically. Without a
|
||||
database URL, uptime sampling still runs but only the latest in-memory snapshot
|
||||
is available.
|
||||
|
||||
## GitHub webhook
|
||||
|
||||
The webhook process listens on port `3011` at `/github`. Configure GitHub to send
|
||||
|
||||
Reference in New Issue
Block a user