@teamscala/service-boot 0.23.301 → 0.23.302
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/ui-service.ts +8 -1
package/package.json
CHANGED
package/src/ui-service.ts
CHANGED
|
@@ -78,7 +78,14 @@ export async function bootUiService(
|
|
|
78
78
|
// is unaffected by construction: it injects PORT and a Railway-only service
|
|
79
79
|
// has no declared port, so the env still wins there.
|
|
80
80
|
const envPort = process.env.PORT ? Number(process.env.PORT) : undefined;
|
|
81
|
-
|
|
81
|
+
// The APP binds its PRIVATE port (app_port) when present — for scale-to-zero
|
|
82
|
+
// services `port` is the ACTIVATOR's ingress (what callers resolve), not the
|
|
83
|
+
// app's bind. Falling back to `port` keeps RESIDENT + unmigrated services
|
|
84
|
+
// unchanged. Without this, a migrated row (port=activator) would make the app
|
|
85
|
+
// bind the activator's port → SO_REUSEPORT silent load-balancing (the
|
|
86
|
+
// service-ports-from-registry trap: clean boot, two owners in ss -ltnp).
|
|
87
|
+
const declaredAppPort = config.app_port ?? config.port;
|
|
88
|
+
const resolution = resolveServicePort(envPort, declaredAppPort);
|
|
82
89
|
if ("error" in resolution) {
|
|
83
90
|
throw new BootFatalError(
|
|
84
91
|
"ui-service.port-resolution",
|