mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 02:15:51 +00:00
feat(dev): add Lima testing server fixtures (#10844)
This commit is contained in:
1 parent
bf37db3b5f
commit
58f6f9e05b
14 files changed
+600
-38
No files matched your search
@@ -7,6 +7,11 @@ use Illuminate\Database\Seeder;
|
||||
|
||||
class ProjectSeeder extends Seeder
|
||||
{
|
||||
private const LIMA_ENVIRONMENTS = [
|
||||
['name' => 'ubuntu24', 'uuid' => 'ubuntu24'],
|
||||
['name' => 'ubuntu26', 'uuid' => 'ubuntu26'],
|
||||
];
|
||||
|
||||
public function run(): void
|
||||
{
|
||||
$project = Project::create([
|
||||
@@ -16,7 +21,14 @@ class ProjectSeeder extends Seeder
|
||||
'team_id' => 0,
|
||||
]);
|
||||
|
||||
// Update the auto-created environment with a deterministic UUID
|
||||
$project->environments()->first()->update(['uuid' => 'production']);
|
||||
foreach (self::LIMA_ENVIRONMENTS as $index => $environment) {
|
||||
if ($index === 0) {
|
||||
$project->environments()->first()->update($environment);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
$project->environments()->create($environment);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user