Improve timestamp handling and event navigation

This commit is contained in:
Stanislav Rossovskii
2026-05-27 11:01:27 +04:00
parent edc51e9c59
commit 71f0035b0b
37 changed files with 485 additions and 109 deletions

View File

@@ -10,6 +10,8 @@ MONLET_AUTH_TOKEN=$(openssl rand -hex 16) docker compose up --build
```
Brings up: PostgreSQL 16, Monlet server (with Alembic upgrade on start), Web UI.
Web timestamps use `MONLET_WEB_TIME_ZONE` (`UTC` by default); notification text/annotations use `MONLET_NOTIFICATION_TIME_ZONE` (`UTC` by default).
PostgreSQL and server containers run with `TZ=UTC`; local presentation timezones are configured separately.
- Server: http://127.0.0.1:8000 (`/api/v1/health`, `/api/v1/ready`, `/metrics`)
- Web UI: http://127.0.0.1:3000

View File

@@ -5,6 +5,7 @@ services:
POSTGRES_USER: monlet
POSTGRES_PASSWORD: monlet
POSTGRES_DB: monlet
TZ: UTC
healthcheck:
test: ["CMD-SHELL", "pg_isready -U monlet -d monlet"]
interval: 5s
@@ -27,7 +28,9 @@ services:
MONLET_LOG_LEVEL: ${MONLET_LOG_LEVEL:-INFO}
MONLET_ENABLE_DETECTOR: "true"
MONLET_ENABLE_NOTIFIER_WORKER: "true"
MONLET_NOTIFICATION_TIME_ZONE: ${MONLET_NOTIFICATION_TIME_ZONE:-UTC}
MONLET_NOTIFIER_DEBUG_ENABLED: "true"
TZ: UTC
command:
- sh
- -c
@@ -49,6 +52,8 @@ services:
environment:
MONLET_API_BASE_URL: http://server:8000
MONLET_API_TOKEN: ${MONLET_AUTH_TOKEN:?MONLET_AUTH_TOKEN is required}
MONLET_WEB_TIME_ZONE: ${MONLET_WEB_TIME_ZONE:-UTC}
TZ: ${MONLET_WEB_TIME_ZONE:-UTC}
ports:
- "3000:3000"