Change port check
This commit is contained in:
parent
4116830a76
commit
19fecf0b5c
1 changed files with 9 additions and 1 deletions
|
|
@ -200,6 +200,8 @@ func setupContainers(config Config, clientTitle string, clientInfo *ClientInfo,
|
||||||
if err := saveContainerPorts(containerDir, containerNum, resources, containerPorts); err != nil {
|
if err := saveContainerPorts(containerDir, containerNum, resources, containerPorts); err != nil {
|
||||||
log.Printf(" ⚠ Ошибка сохранения портов: %v", err)
|
log.Printf(" ⚠ Ошибка сохранения портов: %v", err)
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
log.Printf(" ⚠ Контейнер %s не был пересоздан — будет повторная попытка при следующем запуске", containerFullName)
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
@ -243,7 +245,13 @@ func setupContainers(config Config, clientTitle string, clientInfo *ClientInfo,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !portsOK {
|
if !portsOK {
|
||||||
recreateContainer(containerFullName, composeFile, containerDir, clientTitle, resources, resourcePortMap, containerNum)
|
updateLockStatus(fmt.Sprintf("recreating container (ports): %s", containerFullName))
|
||||||
|
success := recreateContainer(containerFullName, composeFile, containerDir, clientTitle, resources, resourcePortMap, containerNum)
|
||||||
|
if success {
|
||||||
|
if err := saveContainerPorts(containerDir, containerNum, resources, containerPorts); err != nil {
|
||||||
|
log.Printf(" ⚠ Ошибка сохранения портов: %v", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue