diff --git a/src/tools/addToHomarr.ts b/src/tools/addToHomarr.ts index 3c3c24cce..da421dd4e 100644 --- a/src/tools/addToHomarr.ts +++ b/src/tools/addToHomarr.ts @@ -24,12 +24,12 @@ export function tryMatchService(container: Dockerode.ContainerInfo | undefined) if (container === undefined) return {}; const name = container.Names[0].substring(1); const type = tryMatchType(container.Image); - const port = tryMatchPort(type.toLowerCase()); + const port = tryMatchPort(type.toLowerCase())?.value ?? container.Ports[0]?.PublicPort; return { name, id: container.Id, type: tryMatchType(container.Image), - url: `localhost${port ? `:${port.value}` : ''}`, + url: `localhost${port ? `:${port}` : ''}`, icon: `https://cdn.jsdelivr.net/gh/walkxhub/dashboard-icons/png/${name .replace(/\s+/g, '-') .toLowerCase()}.png`,