2023-03-24 15:47:58 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Database\Seeders;
|
|
|
|
|
2023-03-27 14:31:42 +02:00
|
|
|
use App\Models\PrivateKey;
|
2023-03-24 15:47:58 +01:00
|
|
|
use App\Models\Server;
|
|
|
|
use App\Models\Team;
|
|
|
|
use Illuminate\Database\Seeder;
|
|
|
|
|
|
|
|
class ServerSeeder extends Seeder
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the database seeds.
|
|
|
|
*/
|
|
|
|
public function run(): void
|
|
|
|
{
|
|
|
|
$root_team = Team::find(1);
|
2023-03-27 14:31:42 +02:00
|
|
|
$private_key_1 = PrivateKey::find(1);
|
2023-03-28 15:47:37 +02:00
|
|
|
|
2023-03-28 12:09:34 +02:00
|
|
|
Server::create([
|
2023-03-24 15:47:58 +01:00
|
|
|
'id' => 1,
|
2023-03-28 15:47:37 +02:00
|
|
|
'name' => "testing-local-docker-container",
|
2023-03-24 15:47:58 +01:00
|
|
|
'description' => "This is a test docker container",
|
|
|
|
'ip' => "coolify-testing-host",
|
|
|
|
'team_id' => $root_team->id,
|
2023-03-27 14:31:42 +02:00
|
|
|
'private_key_id' => $private_key_1->id,
|
2023-03-24 15:47:58 +01:00
|
|
|
]);
|
2023-03-24 22:15:36 +01:00
|
|
|
Server::create([
|
|
|
|
'id' => 2,
|
2023-03-28 15:47:37 +02:00
|
|
|
'name' => "testing-local-docker-container-2",
|
2023-03-24 22:15:36 +01:00
|
|
|
'description' => "This is a test docker container",
|
|
|
|
'ip' => "coolify-testing-host-2",
|
|
|
|
'team_id' => $root_team->id,
|
2023-03-27 14:31:42 +02:00
|
|
|
'private_key_id' => $private_key_1->id,
|
2023-03-24 22:15:36 +01:00
|
|
|
]);
|
2023-03-28 15:47:37 +02:00
|
|
|
Server::create([
|
|
|
|
'id' => 3,
|
|
|
|
'name' => "localhost",
|
|
|
|
'description' => "This is the local machine",
|
2023-03-29 12:27:02 +02:00
|
|
|
'user' => 'root',
|
2023-03-31 11:26:56 +01:00
|
|
|
'ip' => "coolify-testing-host",
|
2023-03-28 15:47:37 +02:00
|
|
|
'team_id' => $root_team->id,
|
|
|
|
'private_key_id' => $private_key_1->id,
|
|
|
|
]);
|
2023-03-24 15:47:58 +01:00
|
|
|
}
|
|
|
|
}
|