coolify/database/seeders/S3StorageSeeder.php
Andras Bacsai a552cbf4de feat: auto-create MinIO bucket and validate storage in development
Add a separate minio-init container that automatically creates the 'local'
bucket when MinIO starts in development. Mark the seeded S3Storage as usable
by default so developers can use MinIO without manual validation.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 17:23:00 +01:00

26 lines
581 B
PHP

<?php
namespace Database\Seeders;
use App\Models\S3Storage;
use Illuminate\Database\Seeder;
class S3StorageSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
S3Storage::create([
'name' => 'Local MinIO',
'description' => 'Local MinIO S3 Storage',
'key' => 'minioadmin',
'secret' => 'minioadmin',
'bucket' => 'local',
'endpoint' => 'http://coolify-minio:9000',
'team_id' => 0,
'is_usable' => true,
]);
}
}