fix: seeders
This commit is contained in:
parent
ff5ff7f310
commit
1ba57ef6c3
@ -20,51 +20,21 @@ class ApplicationSeeder extends Seeder
|
||||
{
|
||||
$environment_1 = Environment::find(1);
|
||||
$standalone_docker_1 = StandaloneDocker::find(1);
|
||||
$swarm_docker_1 = SwarmDocker::find(1);
|
||||
|
||||
$github_public_source = GithubApp::where('name', 'Public GitHub')->first();
|
||||
$github_private_source = GithubApp::where('name', 'coolify-laravel-development-private-github')->first();
|
||||
$github_private_source_with_deploy_key = GithubApp::where('name', 'Private GitHub (deployment key)')->first();
|
||||
|
||||
$pv_storage = LocalPersistentVolume::find(1);
|
||||
Application::create([
|
||||
'name' => 'Public application (from GitHub)',
|
||||
'git_repository' => 'coollabsio/coolify-examples',
|
||||
'git_branch' => 'nodejs-fastify',
|
||||
'build_pack' => 'nixpacks',
|
||||
'ports_exposes' => '3000',
|
||||
'ports_mappings' => '3000:3000,3010:3001',
|
||||
'ports_mappings' => '3000:3000',
|
||||
'environment_id' => $environment_1->id,
|
||||
'destination_id' => $standalone_docker_1->id,
|
||||
'destination_type' => StandaloneDocker::class,
|
||||
'source_id' => $github_public_source->id,
|
||||
'source_type' => GithubApp::class,
|
||||
]);
|
||||
// Application::create([
|
||||
// 'name' => 'Private application (through GitHub App)',
|
||||
// 'git_repository' => 'coollabsio/nodejs-example',
|
||||
// 'git_branch' => 'main',
|
||||
// 'build_pack' => 'nixpacks',
|
||||
// 'ports_exposes' => '3000',
|
||||
// 'ports_mappings' => '3001:3000',
|
||||
// 'environment_id' => $environment_1->id,
|
||||
// 'destination_id' => $standalone_docker_1->id,
|
||||
// 'destination_type' => StandaloneDocker::class,
|
||||
// 'source_id' => $github_private_source->id,
|
||||
// 'source_type' => GithubApp::class,
|
||||
// ]);
|
||||
// Application::create([
|
||||
// 'name' => 'Public application (from GitHub through Deploy Key)',
|
||||
// 'git_repository' => 'coollabsio/php',
|
||||
// 'git_branch' => 'main',
|
||||
// 'build_pack' => 'nixpacks',
|
||||
// 'ports_exposes' => '80,3000',
|
||||
// 'ports_mappings' => '3002:80',
|
||||
// 'environment_id' => $environment_1->id,
|
||||
// 'destination_id' => $standalone_docker_1->id,
|
||||
// 'destination_type' => StandaloneDocker::class,
|
||||
// 'source_id' => $github_private_source_with_deploy_key->id,
|
||||
// 'source_type' => GithubApp::class,
|
||||
// ]);
|
||||
}
|
||||
}
|
||||
|
@ -16,15 +16,6 @@ class ServerSeeder extends Seeder
|
||||
{
|
||||
$root_team = Team::find(0);
|
||||
$private_key_1 = PrivateKey::find(1);
|
||||
Server::create([
|
||||
'id' => 0,
|
||||
'name' => "localhost",
|
||||
'description' => "This is the local machine",
|
||||
'user' => 'root',
|
||||
'ip' => "host.docker.internal",
|
||||
'team_id' => $root_team->id,
|
||||
'private_key_id' => $private_key_1->id,
|
||||
]);
|
||||
Server::create([
|
||||
'id' => 1,
|
||||
'name' => "testing-local-docker-container",
|
||||
|
@ -13,11 +13,11 @@ class ServerSettingSeeder extends Seeder
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$server_2 = Server::find(2)->load(['settings']);
|
||||
$server_2 = Server::find(1)->load(['settings']);
|
||||
$server_2->settings->is_build_server = true;
|
||||
$server_2->settings->save();
|
||||
|
||||
$server_3 = Server::find(3)->load(['settings']);
|
||||
$server_3 = Server::find(2)->load(['settings']);
|
||||
$server_3->settings->is_build_server = true;
|
||||
$server_3->settings->save();
|
||||
|
||||
|
@ -15,11 +15,11 @@ class StandaloneDockerSeeder extends Seeder
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$server_0 = Server::find(0);
|
||||
$server_1 = Server::find(1);
|
||||
StandaloneDocker::create([
|
||||
'id' => 1,
|
||||
'network' => 'coolify',
|
||||
'server_id' => $server_0->id,
|
||||
'server_id' => $server_1->id,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -11,8 +11,8 @@ class TeamSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$root_user = User::find(1);
|
||||
$normal_user = User::find(2);
|
||||
$root_user = User::find(0);
|
||||
$normal_user = User::find(1);
|
||||
|
||||
$root_user_personal_team = Team::create([
|
||||
'id' => 0,
|
||||
|
@ -10,6 +10,7 @@ class UserSeeder extends Seeder
|
||||
public function run(): void
|
||||
{
|
||||
User::factory()->create([
|
||||
"id" => 0,
|
||||
'name' => 'Root User',
|
||||
'email' => 'test@example.com',
|
||||
'is_root_user' => true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user