From ca2c66943c795f556ce57f26585d709861708775 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 17 Jan 2025 14:00:20 +0100 Subject: [PATCH] fix --- app/Console/Commands/Init.php | 10 ++-------- database/seeders/ProductionSeeder.php | 6 ++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/Console/Commands/Init.php b/app/Console/Commands/Init.php index 1e4663073..a954b10fd 100644 --- a/app/Console/Commands/Init.php +++ b/app/Console/Commands/Init.php @@ -35,10 +35,7 @@ class Init extends Command } $this->servers = Server::all(); - if (isCloud()) { - echo "Running in cloud mode\n"; - } else { - echo "Running in self-hosted mode\n"; + if (! isCloud()) { $this->send_alive_signal(); get_public_ips(); } @@ -64,7 +61,7 @@ class Init extends Command try { $this->pullHelperImage(); } catch (\Throwable $e) { - echo "Error pulling helper image: {$e->getMessage()}\n"; + // } if (isCloud()) { @@ -125,7 +122,6 @@ class Init extends Command try { User::whereRaw('email ~ \'[A-Z]\'')->get()->each(function (User $user) { $user->update(['email' => strtolower($user->email)]); - $user->update(['email' => strtolower($user->email)]); }); } catch (\Throwable $e) { echo "Error in updating user emails: {$e->getMessage()}\n"; @@ -229,7 +225,6 @@ class Init extends Command private function send_alive_signal() { - echo "Sending alive signal...\n"; $id = config('app.id'); $version = config('constants.coolify.version'); $settings = instanceSettings(); @@ -255,7 +250,6 @@ class Init extends Command } $queued_inprogress_deployments = ApplicationDeploymentQueue::whereIn('status', [ApplicationDeploymentStatus::IN_PROGRESS->value, ApplicationDeploymentStatus::QUEUED->value])->get(); foreach ($queued_inprogress_deployments as $deployment) { - echo "Marking deployment {$deployment->id} as failed\n"; $deployment->status = ApplicationDeploymentStatus::FAILED->value; $deployment->save(); } diff --git a/database/seeders/ProductionSeeder.php b/database/seeders/ProductionSeeder.php index 268fd8291..bbb9fcb75 100644 --- a/database/seeders/ProductionSeeder.php +++ b/database/seeders/ProductionSeeder.php @@ -23,6 +23,12 @@ class ProductionSeeder extends Seeder { $user = 'root'; + if (isCloud()) { + echo " Running in cloud mode.\n"; + } else { + echo " Running in self-hosted mode.\n"; + } + if (User::find(0) !== null && Team::find(0) !== null) { if (DB::table('team_user')->where('user_id', 0)->first() === null) { DB::table('team_user')->insert([