2023-03-27 08:44:31 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Database\Seeders;
|
|
|
|
|
2023-05-16 12:11:55 +00:00
|
|
|
use App\Data\ApplicationPreview;
|
2023-03-27 08:44:31 +00:00
|
|
|
use App\Models\Application;
|
2023-03-28 13:47:37 +00:00
|
|
|
use App\Models\ApplicationSetting;
|
2023-03-27 08:44:31 +00:00
|
|
|
use App\Models\Environment;
|
2023-03-28 10:09:34 +00:00
|
|
|
use App\Models\GithubApp;
|
2023-04-03 11:37:53 +00:00
|
|
|
use App\Models\LocalPersistentVolume;
|
2023-03-27 12:31:42 +00:00
|
|
|
use App\Models\StandaloneDocker;
|
2023-03-27 16:14:33 +00:00
|
|
|
use App\Models\SwarmDocker;
|
2023-03-27 08:44:31 +00:00
|
|
|
use Illuminate\Database\Seeder;
|
|
|
|
|
|
|
|
class ApplicationSeeder extends Seeder
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the database seeds.
|
|
|
|
*/
|
|
|
|
public function run(): void
|
|
|
|
{
|
2023-04-04 12:11:53 +00:00
|
|
|
$github_public_source = GithubApp::where('name', 'Public GitHub')->first();
|
2023-04-03 11:37:53 +00:00
|
|
|
|
2023-03-27 16:14:33 +00:00
|
|
|
Application::create([
|
2023-05-08 09:51:03 +00:00
|
|
|
'name' => 'coollabsio/coolify-examples:nodejs-fastify',
|
2023-08-07 16:46:40 +00:00
|
|
|
'description' => 'NodeJS Fastify Example',
|
2023-05-30 13:52:17 +00:00
|
|
|
'fqdn' => 'http://foo.com',
|
2023-05-11 13:20:02 +00:00
|
|
|
'repository_project_id' => 603035348,
|
2023-03-28 13:47:37 +00:00
|
|
|
'git_repository' => 'coollabsio/coolify-examples',
|
|
|
|
'git_branch' => 'nodejs-fastify',
|
|
|
|
'build_pack' => 'nixpacks',
|
|
|
|
'ports_exposes' => '3000',
|
2023-04-14 10:58:45 +00:00
|
|
|
'ports_mappings' => '3000:3000',
|
2023-08-07 16:46:40 +00:00
|
|
|
'environment_id' => 1,
|
|
|
|
'destination_id' => 1,
|
2023-03-27 12:31:42 +00:00
|
|
|
'destination_type' => StandaloneDocker::class,
|
2023-03-28 10:09:34 +00:00
|
|
|
'source_id' => $github_public_source->id,
|
2023-05-30 13:52:17 +00:00
|
|
|
'source_type' => GithubApp::class
|
2023-03-27 08:44:31 +00:00
|
|
|
]);
|
|
|
|
}
|
2023-08-07 16:46:40 +00:00
|
|
|
}
|