feat: add persistent volumes

This commit is contained in:
Andras Bacsai
2023-04-04 15:25:42 +02:00
parent 302f224bc0
commit 2d17c15b71
4 changed files with 37 additions and 19 deletions

View File

@@ -40,7 +40,7 @@ return new class extends Migration
$table->string('base_directory')->default('/');
$table->string('publish_directory')->nullable();
$table->string('health_check_path')->nullable();
$table->string('health_check_path')->default('/');
$table->string('health_check_port')->nullable();
$table->string('health_check_host')->default('localhost');
$table->string('health_check_method')->default('GET');

View File

@@ -18,7 +18,6 @@ class DatabaseSeeder extends Seeder
ProjectSeeder::class,
ProjectSettingSeeder::class,
EnvironmentSeeder::class,
LocalPersistentVolumeSeeder::class,
StandaloneDockerSeeder::class,
SwarmDockerSeeder::class,
KubernetesSeeder::class,
@@ -28,6 +27,7 @@ class DatabaseSeeder extends Seeder
ApplicationSettingsSeeder::class,
DBSeeder::class,
ServiceSeeder::class,
LocalPersistentVolumeSeeder::class,
]);
}
}

View File

@@ -13,10 +13,11 @@ class LocalPersistentVolumeSeeder extends Seeder
*/
public function run(): void
{
$application = Application::where('name', 'Public application (from GitHub)')->first();
LocalPersistentVolume::create([
'name' => 'test-pv',
'mount_path' => '/data',
'resource_id' => 1,
'resource_id' => $application->id,
'resource_type' => Application::class,
]);
}