diff --git a/config/version.php b/config/version.php index 6fa9f0eb6..3847005bb 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@ get("{$coolify_key_name}"); if ($coolify_key) { - $private_key = PrivateKey::find(0); - if ($private_key == null) { - PrivateKey::create([ + PrivateKey::updateOrCreate( + [ 'id' => 0, 'name' => 'localhost\'s key', 'description' => 'The private key for the Coolify host machine (localhost).', - 'private_key' => $coolify_key, 'team_id' => 0, - ]); - } else { - $private_key->private_key = $coolify_key; - $private_key->save(); - } + ], + ['private_key' => $coolify_key] + ); } else { - // TODO: Add a command to generate a new SSH key for the Coolify host machine (localhost). echo "No SSH key found for the Coolify host machine (localhost).\n"; - echo "Please generate one and save it in storage/app/ssh/keys/{$coolify_key_name}\n"; + echo "Please generate one and save it in /data/coolify/ssh/keys/{$coolify_key_name}\n"; + echo "Then try to install again.\n"; + exit(1); } // Add Coolify host (localhost) as Server if it doesn't exist diff --git a/versions.json b/versions.json index 3b0f5dc07..f4048f147 100644 --- a/versions.json +++ b/versions.json @@ -4,7 +4,7 @@ "version": "3.12.32" }, "v4": { - "version": "4.0.0-nightly.22" + "version": "4.0.0-nightly.23" } } } \ No newline at end of file