feat!: let checkers and status page servers reach data only through the api
Only cmd/api connects to Postgres and Redis. Agents authenticate with tokens created by 'api agent create' and use /agent/v1: checkers long poll for jobs, which doubles as heartbeat, and report results in batches. Organizations manage monitors through /api/v1/org/monitors. BREAKING CHANGE: cmd/checker and cmd/statuspage no longer read UPTIME_DATABASE_URL or UPTIME_REDIS_*; they need UPTIME_API_URL and UPTIME_AGENT_TOKEN. UPTIME_CHECKER_REGION is replaced by the region bound to the agent token. Closes #10 Closes #11 Closes #12 Closes #13 Closes #49 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
1 parent
56862dce84
commit
d9891bb050
23 files changed
+1361
-45
No files matched your search
+10
-1
@@ -1,6 +1,5 @@
|
||||
UPTIME_DATABASE_URL=postgres://uptime:uptime@localhost:5432/uptime?sslmode=disable
|
||||
UPTIME_REDIS_URL=redis://localhost:6379/0
|
||||
UPTIME_CHECKER_REGION=local
|
||||
|
||||
# Sentinel instead of a single redis (docker compose --profile sentinel up -d)
|
||||
# UPTIME_REDIS_SENTINEL_MASTER=uptime
|
||||
@@ -13,3 +12,13 @@ UPTIME_PUBLIC_URL=http://localhost:8080
|
||||
# Lets organizations use IdPs on private networks (e.g. an internal Keycloak).
|
||||
# auto = allowed for UPTIME_EDITION=selfhosted, denied for cloud.
|
||||
UPTIME_SSO_ALLOW_PRIVATE_NETWORKS=auto
|
||||
|
||||
# Checker and status page reach the API only. Create tokens with:
|
||||
# api agent create --kind checker --region local --name dev
|
||||
# api agent create --kind statuspage --name dev
|
||||
# and set UPTIME_AGENT_TOKEN for each process.
|
||||
UPTIME_API_URL=http://localhost:8080
|
||||
|
||||
# Integration tests (make test). The Redis database is flushed by the tests.
|
||||
UPTIME_TEST_DATABASE_URL=postgres://uptime:uptime@localhost:5432/uptime_test?sslmode=disable
|
||||
UPTIME_TEST_REDIS_URL=redis://localhost:6379/15
|
||||
Reference in new issue
Block a user