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
Refactor Redis password handling and migration to use environment variables
Andras Bacsai6c82d0ae5f0b
diff --git a/app/Livewire/Project/Database/Redis/General.php b/app/Livewire/Project/Database/Redis/General.phpindex 36eeb8ab13..9fbceda0cf 100644--- a/app/Livewire/Project/Database/Redis/General.php+++ b/app/Livewire/Project/Database/Redis/General.php@@ -20,9 +20,9 @@ class General extends Componentpublic StandaloneRedis $database;- public ?string $redis_username;+ public string $redis_username;- public ?string $redis_password;+ public string $redis_password;public string $redis_version;diff --git a/database/migrations/2024_10_16_120026_move_redis_password_to_envs.php b/database/migrations/2024_10_16_120026_move_redis_password_to_envs.phpindex 2471f0ed2a..6fcac25129 100644--- a/database/migrations/2024_10_16_120026_move_redis_password_to_envs.php+++ b/database/migrations/2024_10_16_120026_move_redis_password_to_envs.php@@ -18,11 +18,11 @@ class MoveRedisPasswordToEnvs extends Migrationtry {StandaloneRedis::chunkById(100, function ($redisInstances) {foreach ($redisInstances as $redis) {- loggy('Moving Redis password to envs', ['redis_id' => $redis->id,'redis_password' => $redis->redis_password]);+ $redis_password = DB::table('standalone_redis')->where('id', $redis->id)->value('redis_password');EnvironmentVariable::create(['standalone_redis_id' => $redis->id,'key' => 'REDIS_PASSWORD',- 'value' => $redis->redis_password,+ 'value' => $redis_password,]);EnvironmentVariable::create(['standalone_redis_id' => $redis->id,