Commit 6ec441c
committed
feat(all): add satellite_url field with auto-detection and first-heartbeat updates
Add satellite_url field to satellites table to track publicly accessible URLs.
Supports explicit configuration via DEPLOYSTACK_SATELLITE_URL environment
variable or auto-detection from request headers (X-Forwarded-Proto/Host).
Backend changes:
- Add satellite_url field to satellites schema (NOT NULL)
- Create idempotent migration with IF NOT EXISTS handling
- Update registration endpoint to accept and auto-detect satellite URLs
- Update heartbeat endpoint to accept URL on first heartbeat only
- Add detectSatelliteUrl() helper with reverse proxy header support
Satellite changes:
- Update client to send URL during registration
- Add hasUpdatedUrlThisSession flag to HeartbeatService
- Send URL only on first heartbeat after startup (not every 30s)
- Support explicit URL from env var or empty string for auto-detection
Documentation updates:
- Update satellite developer docs (registration.mdx, backend-communication.mdx)
- Update backend developer docs (communication.mdx)
- Document auto-detection behavior in .env.example
URL updates occur during:
- Initial satellite registration
- First heartbeat after satellite restart
If DEPLOYSTACK_SATELLITE_URL not set, backend auto-detects from request.1 parent 8d4499a commit 6ec441c
File tree
11 files changed
+6297
-31
lines changed- services
- backend
- drizzle/migrations
- meta
- src
- db/schema-tables
- routes/satellites
- satellite
- src
- services
11 files changed
+6297
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
0 commit comments