refactor: Add localhost as Server if it doesn't exist and not in cloud environment
This commit is contained in:
@@ -65,7 +65,8 @@ class ProductionSeeder extends Seeder
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
// Add Coolify host (localhost) as Server if it doesn't exist
|
// Add Coolify host (localhost) as Server if it doesn't exist
|
||||||
if (Server::find(0) == null && ! isCloud()) {
|
if (! isCloud()) {
|
||||||
|
if (Server::find(0) == null) {
|
||||||
$server_details = [
|
$server_details = [
|
||||||
'id' => 0,
|
'id' => 0,
|
||||||
'name' => 'localhost',
|
'name' => 'localhost',
|
||||||
@@ -89,7 +90,7 @@ class ProductionSeeder extends Seeder
|
|||||||
$server->settings->is_usable = true;
|
$server->settings->is_usable = true;
|
||||||
$server->settings->save();
|
$server->settings->save();
|
||||||
}
|
}
|
||||||
if (StandaloneDocker::find(0) == null && ! isCloud()) {
|
if (StandaloneDocker::find(0) == null) {
|
||||||
StandaloneDocker::create([
|
StandaloneDocker::create([
|
||||||
'id' => 0,
|
'id' => 0,
|
||||||
'name' => 'localhost-coolify',
|
'name' => 'localhost-coolify',
|
||||||
@@ -97,6 +98,7 @@ class ProductionSeeder extends Seeder
|
|||||||
'server_id' => 0,
|
'server_id' => 0,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (! isCloud() && config('coolify.is_windows_docker_desktop') == false) {
|
if (! isCloud() && config('coolify.is_windows_docker_desktop') == false) {
|
||||||
echo "Checking localhost key.\n";
|
echo "Checking localhost key.\n";
|
||||||
|
Reference in New Issue
Block a user