feat: init postgresql database
This commit is contained in:
@@ -19,13 +19,11 @@ class ApplicationSeeder extends Seeder
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$environment_1 = Environment::find(1);
|
||||
$standalone_docker_1 = StandaloneDocker::find(1);
|
||||
|
||||
$github_public_source = GithubApp::where('name', 'Public GitHub')->first();
|
||||
|
||||
Application::create([
|
||||
'name' => 'coollabsio/coolify-examples:nodejs-fastify',
|
||||
'description' => 'NodeJS Fastify Example',
|
||||
'fqdn' => 'http://foo.com',
|
||||
'repository_project_id' => 603035348,
|
||||
'git_repository' => 'coollabsio/coolify-examples',
|
||||
@@ -33,11 +31,11 @@ class ApplicationSeeder extends Seeder
|
||||
'build_pack' => 'nixpacks',
|
||||
'ports_exposes' => '3000',
|
||||
'ports_mappings' => '3000:3000',
|
||||
'environment_id' => $environment_1->id,
|
||||
'destination_id' => $standalone_docker_1->id,
|
||||
'environment_id' => 1,
|
||||
'destination_id' => 1,
|
||||
'destination_type' => StandaloneDocker::class,
|
||||
'source_id' => $github_public_source->id,
|
||||
'source_type' => GithubApp::class
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,7 @@ class DatabaseSeeder extends Seeder
|
||||
EnvironmentVariableSeeder::class,
|
||||
LocalPersistentVolumeSeeder::class,
|
||||
S3StorageSeeder::class,
|
||||
PostgresqlSeeder::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
26
database/seeders/PostgresqlSeeder.php
Normal file
26
database/seeders/PostgresqlSeeder.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\Postgresql;
|
||||
use App\Models\StandaloneDocker;
|
||||
|
||||
class PostgresqlSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
Postgresql::create([
|
||||
'name' => 'Local PostgreSQL',
|
||||
'description' => 'Local PostgreSQL for testing',
|
||||
'postgres_password' => 'postgres',
|
||||
'environment_id' => 1,
|
||||
'destination_id' => 1,
|
||||
'destination_type' => StandaloneDocker::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user