Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ services:
- ANALYTICS_COOKIE_MAX_AGE_DAYS=365
- ANALYTICS_COOKIE_SAMESITE=Lax
- ANALYTICS_COOKIE_SECURE=false
# Optional: POST unhandled errors to a webhook (see docs/getting-started.md).
- PIXELMAP_ERROR_WEBHOOK_URL=${PIXELMAP_ERROR_WEBHOOK_URL:-}
- PIXELMAP_ERROR_WEBHOOK_TOKEN=${PIXELMAP_ERROR_WEBHOOK_TOKEN:-}
volumes:
- ./output:/app/output
- brainglobe_cache:/root/.brainglobe
Expand Down
14 changes: 14 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,20 @@ RAM is sized for multiple copies of every cache. Mount the
RSS is logged to stdout every 60 s.
:::

:::{note}
**Error notifications**: errors raised while handling a user's action are
shown to that user as a toast and logged with a traceback; they do not take
down the session or the server. To also receive them, set
`PIXELMAP_ERROR_WEBHOOK_URL` to an `http(s)` endpoint. Each error is POSTed
as JSON with a one-line `text`/`content` summary (so Slack, Mattermost and
Discord incoming webhooks work as-is) and an `event` object holding the
type, message, traceback, session id, host and version. Optional settings:
`PIXELMAP_ERROR_WEBHOOK_TOKEN` (sent as `Authorization: Bearer <token>`),
`PIXELMAP_ERROR_WEBHOOK_TIMEOUT` (seconds, default 5) and
`PIXELMAP_ERROR_WEBHOOK_DEDUPE_SECONDS` (identical errors are sent at most
once per window, default 60; `0` sends every one).
:::

## Quick Start

### Option 1: Browser GUI
Expand Down
7 changes: 7 additions & 0 deletions env.template
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,10 @@ ANALYTICS_COOKIE_NAME=pixelmap_visitor_id
ANALYTICS_COOKIE_MAX_AGE_DAYS=365
ANALYTICS_COOKIE_SAMESITE=Lax
ANALYTICS_COOKIE_SECURE=false

# Error notifications (optional). Errors are always toasted to the user and
# logged; set a URL to also POST them as JSON (Slack/Discord-compatible).
PIXELMAP_ERROR_WEBHOOK_URL=
PIXELMAP_ERROR_WEBHOOK_TOKEN=
PIXELMAP_ERROR_WEBHOOK_TIMEOUT=5
PIXELMAP_ERROR_WEBHOOK_DEDUPE_SECONDS=60
Loading
Loading