mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 02:15:51 +00:00
fix(service): defer stop when pulling latest images
Ensure restart actions flow through StartService so pull-latest restarts can avoid stopping the service before image pulls. Also raise the changelog modal above the desktop sidebar toggle.
This commit is contained in:
1 parent
38e855b20e
commit
c9fcc0bc44
6 files changed
+94
-11
No files matched your search
@@ -19,7 +19,7 @@ class StartService
|
||||
public function handle(Service $service, bool $pullLatestImages = false, bool $stopBeforeStart = false)
|
||||
{
|
||||
$service->parse();
|
||||
if ($stopBeforeStart) {
|
||||
if ($this->shouldStopBeforeStarting($pullLatestImages, $stopBeforeStart)) {
|
||||
StopService::run(service: $service, dockerCleanup: false);
|
||||
}
|
||||
$service->saveComposeConfigs();
|
||||
@@ -53,4 +53,9 @@ class StartService
|
||||
|
||||
return remote_process($commands, $service->server, type_uuid: $service->uuid, callEventOnFinish: 'ServiceStatusChanged');
|
||||
}
|
||||
|
||||
private function shouldStopBeforeStarting(bool $pullLatestImages, bool $stopBeforeStart): bool
|
||||
{
|
||||
return $stopBeforeStart && ! $pullLatestImages;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user