Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

cleanup

Alexzvn1feb8488a38c
diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php
index 54a80a92a1..2d3b0d5a6a 100644
--- a/app/Jobs/ApplicationDeploymentJob.php
+++ b/app/Jobs/ApplicationDeploymentJob.php
@@ -2029,19 +2029,17 @@ COPY ./nginx.conf /etc/nginx/conf.d/default.conf");
*/
private function graceful_shutdown_container(string $containerName, int $timeout = 300) {
try {
- $this->execute_remote_command(
+ return $this->execute_remote_command(
["docker stop --time=$timeout $containerName > /dev/null 2>&1", 'hidden' => true],
["docker rm $containerName > /dev/null 2>&1", 'hidden' => true]
);
-
- return;
} catch (\Exception $error) {
// report error if needed
- } finally {
- $this->execute_remote_command(
- ["docker rm -f $containerName >/dev/null 2>&1", 'hidden' => true, 'ignore_errors' => true]
- );
}
+
+ $this->execute_remote_command(
+ ["docker rm -f $containerName >/dev/null 2>&1", 'hidden' => true, 'ignore_errors' => true]
+ );
}
private function stop_running_container(bool $force = false)