mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 18:18:29 +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
@@ -9,6 +9,13 @@ use Illuminate\Database\Seeder;
|
||||
|
||||
class ServerSeeder extends Seeder
|
||||
{
|
||||
private const LIMA_SENTINEL_URL = 'http://host.lima.internal:8000';
|
||||
|
||||
private const LIMA_SERVERS = [
|
||||
['uuid' => 'lima-ubuntu-2404', 'name' => 'lima-ubuntu-2404', 'port' => 2222],
|
||||
['uuid' => 'lima-ubuntu-2604', 'name' => 'lima-ubuntu-2604', 'port' => 2223],
|
||||
];
|
||||
|
||||
public function run(): void
|
||||
{
|
||||
Server::create([
|
||||
@@ -24,5 +31,25 @@ class ServerSeeder extends Seeder
|
||||
'status' => ProxyStatus::EXITED->value,
|
||||
],
|
||||
]);
|
||||
|
||||
foreach (self::LIMA_SERVERS as $limaServer) {
|
||||
$server = Server::create([
|
||||
'uuid' => $limaServer['uuid'],
|
||||
'name' => $limaServer['name'],
|
||||
'description' => 'This is a Lima VM for local development testing',
|
||||
'ip' => 'host.docker.internal',
|
||||
'port' => $limaServer['port'],
|
||||
'team_id' => 0,
|
||||
'private_key_id' => 1,
|
||||
'proxy' => [
|
||||
'type' => ProxyTypes::TRAEFIK->value,
|
||||
'status' => ProxyStatus::EXITED->value,
|
||||
],
|
||||
]);
|
||||
|
||||
$server->settings->forceFill([
|
||||
'sentinel_custom_url' => self::LIMA_SENTINEL_URL,
|
||||
])->saveQuietly();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user