chore: Update ProductionSeeder to call OauthSettingSeeder and PopulateSshKeysDirectorySeeder

This commit is contained in:
Andras Bacsai
2024-09-20 11:34:13 +02:00
parent be8573c828
commit b81f9114d9

View File

@@ -106,10 +106,9 @@ class ProductionSeeder extends Seeder
$found = PrivateKey::find(0); $found = PrivateKey::find(0);
if ($found) { if ($found) {
echo 'Private Key found in database.'; echo 'Private Key found in database.\n';
if ($coolify_key) { if ($coolify_key) {
echo "SSH key found for the Coolify host machine (localhost).\n"; echo "SSH key found for the Coolify host machine (localhost).\n";
Storage::disk('ssh-keys')->delete($coolify_key);
} }
} else { } else {
if ($coolify_key) { if ($coolify_key) {
@@ -124,7 +123,6 @@ class ProductionSeeder extends Seeder
]); ]);
$server->update(['user' => $user]); $server->update(['user' => $user]);
echo "SSH key found for the Coolify host machine (localhost).\n"; echo "SSH key found for the Coolify host machine (localhost).\n";
Storage::disk('ssh-keys')->delete($coolify_key);
} else { } else {
PrivateKey::create( PrivateKey::create(
[ [
@@ -198,8 +196,8 @@ uZx9iFkCELtxrh31QJ68AAAAEXNhaWxANzZmZjY2ZDJlMmRkAQIDBA==
get_public_ips(); get_public_ips();
$oauth_settings_seeder = new OauthSettingSeeder; $this->call(OauthSettingSeeder::class);
$oauth_settings_seeder->run(); $this->call(PopulateSshKeysDirectorySeeder::class);
} }
} }