diff --git a/services/mam-api/src/index.js b/services/mam-api/src/index.js index 42bd169..9593a59 100644 --- a/services/mam-api/src/index.js +++ b/services/mam-api/src/index.js @@ -109,6 +109,10 @@ await loadS3ConfigFromDb(); // ── Cluster self-heartbeat ──────────────────────────────────────────────────── // Registers this node in cluster_nodes every 30 s so the Cluster page shows it. function getLocalIp() { + // Prefer an explicit override — useful when running inside Docker where + // os.networkInterfaces() returns container bridge IPs, not the host LAN IP. + if (process.env.NODE_IP) return process.env.NODE_IP; + const ifaces = os.networkInterfaces(); for (const name of Object.keys(ifaces)) { for (const iface of (ifaces[name] || [])) {