From 5a54bcdd269b55ff0828fe19b4a7ac152eb7455a Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 21 Oct 2024 13:43:31 +0200 Subject: [PATCH] Refactor Redis password handling and migration to use environment variables --- bootstrap/helpers/databases.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap/helpers/databases.php b/bootstrap/helpers/databases.php index 65712a24a..e12910f82 100644 --- a/bootstrap/helpers/databases.php +++ b/bootstrap/helpers/databases.php @@ -49,7 +49,7 @@ function create_standalone_redis($environment_id, $destination_uuid, ?array $oth } $database = new StandaloneRedis; $database->name = generate_database_name('redis'); - $database->redis_password = \Illuminate\Support\Str::password(length: 64, symbols: false); + $redis_password = \Illuminate\Support\Str::password(length: 64, symbols: false); $database->environment_id = $environment_id; $database->destination_id = $destination->id; $database->destination_type = $destination->getMorphClass(); @@ -60,7 +60,7 @@ function create_standalone_redis($environment_id, $destination_uuid, ?array $oth EnvironmentVariable::create([ 'key' => 'REDIS_PASSWORD', - 'value' => $database->redis_password, + 'value' => $redis_password, 'standalone_redis_id' => $database->id, 'is_shared' => false, ]);