From ccf63c67e83bce37a51657c444232e427ea94946 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 13 Nov 2023 19:25:18 +0100 Subject: [PATCH 1/2] fix: mariadb backups --- app/Jobs/DatabaseBackupJob.php | 8 ++++---- config/sentry.php | 2 +- config/version.php | 2 +- versions.json | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/Jobs/DatabaseBackupJob.php b/app/Jobs/DatabaseBackupJob.php index f9e947c5a..e24eba848 100644 --- a/app/Jobs/DatabaseBackupJob.php +++ b/app/Jobs/DatabaseBackupJob.php @@ -141,21 +141,21 @@ public function handle(): void } else if ($databaseType === 'standalone-mariadb') { $this->container_name = "{$this->database->name}-$serviceUuid"; $this->directory_name = $serviceName . '-' . $this->container_name; - $commands[] = "docker exec $this->container_name env | grep MARIADB_"; + $commands[] = "docker exec $this->container_name env"; $envs = instant_remote_process($commands, $this->server); $envs = str($envs)->explode("\n"); - + ray($envs); $rootPassword = $envs->filter(function ($env) { return str($env)->startsWith('MARIADB_ROOT_PASSWORD='); })->first(); if ($rootPassword) { - $this->database->mysql_root_password = str($rootPassword)->after('MARIADB_ROOT_PASSWORD=')->value(); + $this->database->mariadb_root_password = str($rootPassword)->after('MARIADB_ROOT_PASSWORD=')->value(); } else { $rootPassword = $envs->filter(function ($env) { return str($env)->startsWith('MYSQL_ROOT_PASSWORD='); })->first(); if ($rootPassword) { - $this->database->mysql_root_password = str($rootPassword)->after('MYSQL_ROOT_PASSWORD=')->value(); + $this->database->mariadb_root_password = str($rootPassword)->after('MYSQL_ROOT_PASSWORD=')->value(); } } diff --git a/config/sentry.php b/config/sentry.php index 8710a3989..980c71a6c 100644 --- a/config/sentry.php +++ b/config/sentry.php @@ -7,7 +7,7 @@ // The release version of your application // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')) - 'release' => '4.0.0-beta.130', + 'release' => '4.0.0-beta.131', // When left empty or `null` the Laravel environment will be used 'environment' => config('app.env'), diff --git a/config/version.php b/config/version.php index 9a7e0b2b7..4a865bbd4 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@ Date: Mon, 13 Nov 2023 19:26:11 +0100 Subject: [PATCH 2/2] remove ray --- app/Jobs/DatabaseBackupJob.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/Jobs/DatabaseBackupJob.php b/app/Jobs/DatabaseBackupJob.php index e24eba848..506e7cbf0 100644 --- a/app/Jobs/DatabaseBackupJob.php +++ b/app/Jobs/DatabaseBackupJob.php @@ -144,7 +144,6 @@ public function handle(): void $commands[] = "docker exec $this->container_name env"; $envs = instant_remote_process($commands, $this->server); $envs = str($envs)->explode("\n"); - ray($envs); $rootPassword = $envs->filter(function ($env) { return str($env)->startsWith('MARIADB_ROOT_PASSWORD='); })->first();