mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-17 17:21:04 +00:00
fix(docker): add fallback for Docker Swarm container labels
This commit is contained in:
@@ -145,6 +145,12 @@ class GetContainersStatus
|
||||
$this->applicationContainerStatuses->put($applicationId, collect());
|
||||
}
|
||||
$containerName = data_get($labels, 'com.docker.compose.service');
|
||||
// Fallback for Docker Swarm which uses different labels
|
||||
if (! $containerName && $this->server->isSwarm()) {
|
||||
$containerName = data_get($labels, 'coolify.serviceName')
|
||||
?? data_get($labels, 'coolify.name')
|
||||
?? data_get($labels, 'com.docker.stack.namespace');
|
||||
}
|
||||
if ($containerName) {
|
||||
$this->applicationContainerStatuses->get($applicationId)->put($containerName, $containerStatus);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user