feat: restart service without pulling the latest image

This commit is contained in:
Andras Bacsai
2024-10-03 13:17:35 +02:00
parent 5da1f48ae1
commit 14c9f25c57
2 changed files with 41 additions and 4 deletions

View File

@@ -108,6 +108,21 @@ class Navbar extends Component
return;
}
StopService::run(service: $this->service, dockerCleanup: false);
$this->service->parse();
$this->dispatch('imagePulled');
$activity = StartService::run($this->service);
$this->dispatch('activityMonitor', $activity->id);
}
public function pullAndRestartEvent()
{
$this->checkDeployments();
if ($this->isDeploymentProgress) {
$this->dispatch('error', 'There is a deployment in progress.');
return;
}
PullImage::run($this->service);
StopService::run(service: $this->service, dockerCleanup: false);
$this->service->parse();