mirror of
https://github.com/coollabsio/coolify.git
synced 2025-12-27 21:25:48 +00:00
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>
This commit is contained in:
parent
375d8e79b4
commit
a552cbf4de
@ -20,6 +20,7 @@ class S3StorageSeeder extends Seeder
|
|||||||
'bucket' => 'local',
|
'bucket' => 'local',
|
||||||
'endpoint' => 'http://coolify-minio:9000',
|
'endpoint' => 'http://coolify-minio:9000',
|
||||||
'team_id' => 0,
|
'team_id' => 0,
|
||||||
|
'is_usable' => true,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -118,6 +118,26 @@ services:
|
|||||||
- dev_minio_data:/data
|
- dev_minio_data:/data
|
||||||
networks:
|
networks:
|
||||||
- coolify
|
- coolify
|
||||||
|
minio-init:
|
||||||
|
image: minio/mc:latest
|
||||||
|
pull_policy: always
|
||||||
|
container_name: coolify-minio-init
|
||||||
|
restart: no
|
||||||
|
depends_on:
|
||||||
|
- minio
|
||||||
|
entrypoint: >
|
||||||
|
/bin/sh -c "
|
||||||
|
echo 'Waiting for MinIO to be ready...';
|
||||||
|
until mc alias set local http://coolify-minio:9000 minioadmin minioadmin 2>/dev/null; do
|
||||||
|
echo 'MinIO not ready yet, waiting...';
|
||||||
|
sleep 2;
|
||||||
|
done;
|
||||||
|
echo 'MinIO is ready, creating bucket if needed...';
|
||||||
|
mc mb local/local --ignore-existing;
|
||||||
|
echo 'MinIO initialization complete - bucket local is ready';
|
||||||
|
"
|
||||||
|
networks:
|
||||||
|
- coolify
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
dev_backups_data:
|
dev_backups_data:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user