coolify/database/seeders/ApplicationSeeder.php

41 lines
1.2 KiB
PHP
Raw Normal View History

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