This commit is contained in:
Joao Patricio
2023-05-03 07:40:12 +01:00
16 changed files with 709 additions and 144 deletions

View File

@@ -21,6 +21,7 @@ return new class extends Migration
$table->string('user')->default('root');
$table->foreignId('team_id');
$table->foreignId('private_key_id');
$table->schemalessAttributes('extra_attributes');
$table->timestamps();
});
}

View File

@@ -2,6 +2,8 @@
namespace Database\Seeders;
use App\Data\ServerMetadata;
use App\Enums\ProxyTypes;
use App\Models\PrivateKey;
use App\Models\Server;
use App\Models\Team;
@@ -16,12 +18,16 @@ class ServerSeeder extends Seeder
{
$root_team = Team::find(0);
$private_key_1 = PrivateKey::find(1);
Server::create([
'name' => "testing-local-docker-container",
'description' => "This is a test docker container",
'ip' => "coolify-testing-host",
'team_id' => $root_team->id,
'private_key_id' => $private_key_1->id,
'extra_attributes' => ServerMetadata::from([
'proxy' => ProxyTypes::TRAEFIK_V2->value
]),
]);
Server::create([
'name' => "testing-local-docker-container-2",
@@ -29,6 +35,9 @@ class ServerSeeder extends Seeder
'ip' => "coolify-testing-host-2",
'team_id' => $root_team->id,
'private_key_id' => $private_key_1->id,
'extra_attributes' => ServerMetadata::from([
//
]),
]);
}
}