fix: don't use container name in label discovery

This commit is contained in:
Stavros
2025-10-12 11:29:23 +03:00
parent 1b87ed9b99
commit 64222b6d15

View File

@@ -93,7 +93,7 @@ func (docker *DockerService) GetLabels(appDomain string) (config.App, error) {
return appLabels, nil return appLabels, nil
} }
if strings.TrimPrefix(inspect.Name, "/") == appName { if strings.SplitN(appDomain, ".", 2)[0] == appName {
log.Debug().Str("id", inspect.ID).Str("name", inspect.Name).Msg("Found matching container by app name") log.Debug().Str("id", inspect.ID).Str("name", inspect.Name).Msg("Found matching container by app name")
return appLabels, nil return appLabels, nil
} }