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.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
code cleanup
peaklabs-deva882d3c713ee
diff --git a/app/Jobs/DatabaseBackupJob.php b/app/Jobs/DatabaseBackupJob.phpindex 59a1af104b..5d481199b2 100644--- a/app/Jobs/DatabaseBackupJob.php+++ b/app/Jobs/DatabaseBackupJob.php@@ -497,6 +497,7 @@ class DatabaseBackupJob implements ShouldBeEncrypted, ShouldQueue$this->ensureHelperImageAvailable();+ $fullImageName = $this->getFullImageName();$commands[] = "docker run -d --network {$network} --name backup-of-{$this->backup->uuid} --rm -v $this->backup_location:$this->backup_location:ro {$fullImageName}";$commands[] = "docker exec backup-of-{$this->backup->uuid} mc config host add temporary {$endpoint} $key $secret";$commands[] = "docker exec backup-of-{$this->backup->uuid} mc cp $this->backup_location temporary/$bucket{$this->backup_dir}/";@@ -513,17 +514,12 @@ class DatabaseBackupJob implements ShouldBeEncrypted, ShouldQueueprivate function ensureHelperImageAvailable(): void{- $settings = InstanceSettings::get();- $helperImage = config('coolify.helper_image');- $latestVersion = $settings->helper_version;- $fullImageName = "{$helperImage}:{$latestVersion}";+ $fullImageName = $this->getFullImageName();$imageExists = $this->checkImageExists($fullImageName);if (!$imageExists) {$this->pullHelperImage($fullImageName);- } else {- return;}}@@ -543,4 +539,12 @@ class DatabaseBackupJob implements ShouldBeEncrypted, ShouldQueuethrow new \RuntimeException($errorMessage);}}++ private function getFullImageName(): string+ {+ $settings = InstanceSettings::get();+ $helperImage = config('coolify.helper_image');+ $latestVersion = $settings->helper_version;+ return "{$helperImage}:{$latestVersion}";+ }}