feat: Add deterministic UUIDs to development seeders

Add fixed UUIDs to all development seeders for programmatic API access:
- Server: localhost
- Project: project
- Applications: docker-compose, nodejs, dockerfile, dockerfile-pure
- StandaloneDocker: docker
- StandalonePostgresql: postgresql
- S3Storage: minio
- PrivateKeys: ssh, github-key
- GithubApps: github-public, github-app
- GitlabApp: gitlab-public
- LocalPersistentVolume: volume

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Andras Bacsai
2025-12-11 09:41:54 +01:00
parent 18675c8a4d
commit 2f721c6166
11 changed files with 1247 additions and 2 deletions

View File

@@ -15,6 +15,7 @@ class ApplicationSeeder extends Seeder
public function run(): void
{
Application::create([
'uuid' => 'docker-compose',
'name' => 'Docker Compose Example',
'repository_project_id' => 603035348,
'git_repository' => 'coollabsio/coolify-examples',
@@ -30,6 +31,7 @@ class ApplicationSeeder extends Seeder
'source_type' => GithubApp::class,
]);
Application::create([
'uuid' => 'nodejs',
'name' => 'NodeJS Fastify Example',
'fqdn' => 'http://nodejs.127.0.0.1.sslip.io',
'repository_project_id' => 603035348,
@@ -45,6 +47,7 @@ class ApplicationSeeder extends Seeder
'source_type' => GithubApp::class,
]);
Application::create([
'uuid' => 'dockerfile',
'name' => 'Dockerfile Example',
'fqdn' => 'http://dockerfile.127.0.0.1.sslip.io',
'repository_project_id' => 603035348,
@@ -60,6 +63,7 @@ class ApplicationSeeder extends Seeder
'source_type' => GithubApp::class,
]);
Application::create([
'uuid' => 'dockerfile-pure',
'name' => 'Pure Dockerfile Example',
'fqdn' => 'http://pure-dockerfile.127.0.0.1.sslip.io',
'git_repository' => 'coollabsio/coolify',
@@ -78,6 +82,7 @@ CMD ["nginx", "-g", "daemon off;"]
',
]);
Application::create([
'uuid' => 'crashloop',
'name' => 'Crash Loop Example',
'git_repository' => 'coollabsio/coolify',
'git_branch' => 'v4.x',

View File

@@ -14,6 +14,7 @@ class GithubAppSeeder extends Seeder
{
GithubApp::create([
'id' => 0,
'uuid' => 'github-public',
'name' => 'Public GitHub',
'api_url' => 'https://api.github.com',
'html_url' => 'https://github.com',
@@ -22,7 +23,7 @@ class GithubAppSeeder extends Seeder
]);
GithubApp::create([
'name' => 'coolify-laravel-dev-public',
'uuid' => '69420',
'uuid' => 'github-app',
'organization' => 'coollabsio',
'api_url' => 'https://api.github.com',
'html_url' => 'https://github.com',

View File

@@ -14,6 +14,7 @@ class GitlabAppSeeder extends Seeder
{
GitlabApp::create([
'id' => 1,
'uuid' => 'gitlab-public',
'name' => 'Public GitLab',
'api_url' => 'https://gitlab.com/api/v4',
'html_url' => 'https://gitlab.com',

View File

@@ -13,6 +13,7 @@ class PrivateKeySeeder extends Seeder
public function run(): void
{
PrivateKey::create([
'uuid' => 'ssh',
'team_id' => 0,
'name' => 'Testing Host Key',
'description' => 'This is a test docker container',
@@ -27,6 +28,7 @@ uZx9iFkCELtxrh31QJ68AAAAEXNhaWxANzZmZjY2ZDJlMmRkAQIDBA==
]);
PrivateKey::create([
'uuid' => 'github-key',
'team_id' => 0,
'name' => 'development-github-app',
'description' => 'This is the key for using the development GitHub app',

View File

@@ -9,10 +9,14 @@ class ProjectSeeder extends Seeder
{
public function run(): void
{
Project::create([
$project = Project::create([
'uuid' => 'project',
'name' => 'My first project',
'description' => 'This is a test project in development',
'team_id' => 0,
]);
// Update the auto-created environment with a deterministic UUID
$project->environments()->first()->update(['uuid' => 'production']);
}
}

View File

@@ -13,6 +13,7 @@ class S3StorageSeeder extends Seeder
public function run(): void
{
S3Storage::create([
'uuid' => 'minio',
'name' => 'Local MinIO',
'description' => 'Local MinIO S3 Storage',
'key' => 'minioadmin',

View File

@@ -13,6 +13,7 @@ class ServerSeeder extends Seeder
{
Server::create([
'id' => 0,
'uuid' => 'localhost',
'name' => 'localhost',
'description' => 'This is a test docker container in development mode',
'ip' => 'coolify-testing-host',

View File

@@ -15,6 +15,7 @@ class StandaloneDockerSeeder extends Seeder
if (StandaloneDocker::find(0) == null) {
StandaloneDocker::create([
'id' => 0,
'uuid' => 'docker',
'name' => 'Standalone Docker 1',
'network' => 'coolify',
'server_id' => 0,

View File

@@ -11,6 +11,7 @@ class StandalonePostgresqlSeeder extends Seeder
public function run(): void
{
StandalonePostgresql::create([
'uuid' => 'postgresql',
'name' => 'Local PostgreSQL',
'description' => 'Local PostgreSQL for testing',
'postgres_password' => 'postgres',