Add GitHub, GitLab, DeployKeys

This commit is contained in:
Andras Bacsai
2023-03-28 12:09:34 +02:00
parent 46c2d311e9
commit 54441ddfde
20 changed files with 326 additions and 24 deletions

View File

@@ -0,0 +1,43 @@
<?php
namespace Database\Seeders;
use App\Models\GitlabApp;
use App\Models\PrivateKey;
use App\Models\Team;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class GitlabAppSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$root_team = Team::find(1);
$private_key_3 = PrivateKey::find(3);
GitlabApp::create([
'id' => 1,
'name' => 'Public GitLab',
'api_url' => 'https://gitlab.com/api/v4',
'html_url' => 'https://gitlab.com',
'is_public' => true,
'team_id' => $root_team->id,
]);
GitlabApp::create([
'id' => 2,
'name' => 'coolify-laravel-development-private-gitlab',
'api_url' => 'https://gitlab.com/api/v4',
'html_url' => 'https://gitlab.com',
'app_id' => 1234,
'app_secret' => '1234',
'oauth_id' => 1234,
'deploy_key_id' => '1234',
'public_key' => 'dfjasiourj',
'webhook_token' => '4u3928u4y392',
'private_key_id' => $private_key_3->id,
'team_id' => $root_team->id,
]);
}
}