fix: persist service host port; demo-data scope for telemetry

Public URLs were ephemeral: every restart/redeploy rebound a random host
port, so endpoint links rotted. Persist published_port on the service and
prefer it for replica 0 on create. If the port is taken, fall back to
ephemeral and repersist the new assignment. Post-start the binding is
verified — Docker Desktop accepts a conflicting publish silently, which
previously left services running with no endpoint at all.

demo-data.ts gains the required scope field for HostMonitoring (CI fix).

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Tomas DvorakandDevin committed 2026-10-04 08:54:23 +02:00
1 parent a91e6531f5
commit c15e6514df
7 files changed
+107 -11

No files matched your search

+1
View File
@@ -456,6 +456,7 @@ export const demoHostMonitoring: HostMonitoring = {
uptimeSeconds: 1_828_800,
dockerAvailable: true,
docker: { containers: 11, images: 34, driver: 'overlay2', server: '27.3.1' },
scope: 'host',
collectedAt: new Date().toISOString(),
};