Skip to content

Commit 6ec441c

Browse files
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

11 files changed

+6297
-31
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ALTER TABLE "satellites" ADD COLUMN IF NOT EXISTS "satellite_url" text NOT NULL DEFAULT 'http://unknown';
2+
--> statement-breakpoint
3+
ALTER TABLE "satellites" ALTER COLUMN "satellite_url" DROP DEFAULT;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"id": "f8c5e2a1-b3d4-4c9e-8f7a-6b5c4d3e2f1a",
3+
"prevId": "0010_young_jimmy_woo",
4+
"version": "7",
5+
"dialect": "postgresql",
6+
"tables": {},
7+
"enums": {},
8+
"schemas": {},
9+
"_meta": {
10+
"schemas": {},
11+
"tables": {},
12+
"columns": {}
13+
}
14+
}

0 commit comments

Comments
 (0)