add destinations

This commit is contained in:
Andras Bacsai
2023-05-02 12:47:52 +02:00
parent 77c86400c0
commit 1a9f360132
16 changed files with 144 additions and 11 deletions

View File

@@ -13,10 +13,12 @@ return new class extends Migration
{
Schema::create('standalone_dockers', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('uuid')->unique();
$table->string('network');
$table->foreignId('server_id');
$table->unique(['server_id', 'network']);
$table->timestamps();
});
}

View File

@@ -13,6 +13,7 @@ return new class extends Migration
{
Schema::create('swarm_dockers', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('uuid')->unique();
$table->foreignId('server_id');

View File

@@ -17,7 +17,7 @@ class StandaloneDockerSeeder extends Seeder
{
$server_1 = Server::find(1);
StandaloneDocker::create([
'id' => 1,
'name' => 'Standalone Docker 1',
'network' => 'coolify',
'server_id' => $server_1->id,
]);

View File

@@ -16,10 +16,10 @@ class SwarmDockerSeeder extends Seeder
*/
public function run(): void
{
$server_1 = Server::find(1);
$server_2 = Server::find(2);
SwarmDocker::create([
'id' => 1,
'server_id' => $server_1->id,
'name' => 'Swarm Docker 1',
'server_id' => $server_2->id,
]);
}
}