No description
- Go 83.8%
- TypeScript 15%
- CSS 0.5%
- Dockerfile 0.4%
- Shell 0.2%
- Other 0.1%
|
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
|
||
|---|---|---|
| cmd/server | ||
| internal | ||
| web | ||
| .dockerignore | ||
| .gitattributes | ||
| .gitignore | ||
| .woodpecker.yml | ||
| config.alerts.example.yaml | ||
| config.docker.example.yaml | ||
| config.example.yaml | ||
| CONFIGURATION.md | ||
| docker-compose.dev.yml | ||
| docker-compose.yml | ||
| docker-entrypoint.sh | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| README.md | ||
polystatus
polystatus is a standalone, YAML-configured uptime monitoring service with persistent history (SQLite), an HTTP API, and a 3D “status home” UI.
Quickstart (local)
- Copy the example config:
Copy-Item .\config.example.yaml .\config.yaml
- Run the server (this is a long-running process; leave it running until you press Ctrl+C):
go run .\cmd\server -config .\config.yaml
- Open the UI:
If you want to run the web dev server instead (hot reload UI):
cd web
npm install
npm run dev
The web dev server proxies API calls to the Go server (see web/vite.config.ts).
Quickstart (Docker)
Docker expects the config file mounted at /config.yaml (the container default) and a persistent /data volume for SQLite.
The container runs polystatus as an unprivileged user (uid 10001) and has a built-in health check (docker ps shows healthy). On start it takes ownership of /data, so volumes from older, root-run images keep working.
- Copy the Docker-oriented example config:
Copy-Item .\config.docker.example.yaml .\config.yaml
- Start the container:
docker compose up -d
Docker compose variants
- Dev (build locally):
docker compose -f .\docker-compose.dev.yml up --build
- Production (pull from Docker Hub):
latestis the newest release tag (vX.Y.Z);devtracks the main branch- Set the image in
docker-compose.ymlto your Docker Hub repo/tag if needed
docker compose up -d
Configuration
- Full reference (all options, defaults, examples): CONFIGURATION.md
- Upgrading: a config from an older version keeps working, and
-migrate-configrewrites it with the current names. The database is upgraded on start. See "Upgrading from an older version" in CONFIGURATION.md.
HTTP API
GET /api/v1/status: everything the UI shows. Theuisettings (durations in milliseconds, such asrefresh_interval_ms), pluschecks[]with:id,name,group,importance,state,linkorigin:scheme://hostthe check points atlatency_ms: omitted for heartbeat checksuptime_pct: share of the history window the check was availableticks:"up","degraded","down"ornull, oldest firstlast_errorupdated_at: ms;nulluntil the check first runs
GET /api/v1/checks:id,name,groupandstateof every check.GET /api/v1/checks/{id}/ticks?window=24h&bin=1m: a check's history.GET /api/v1/checks/{id}/favicon: the check's site favicon, fetched and cached by polystatus.GET /api/v1/summary: the overall state, which is the worst state among all checks.GET /api/v1/events: Server-Sent Events. Eachstate_changeevent carriescheck_id,prev_state,stateandts.POSTorGET /api/v1/push/{id}/{token}: pushes to a heartbeat check.GET /healthz: liveness.
With public_mode: false, everything except /healthz and push URLs needs the access token.