Files
selfhost/init-minio.sh
2025-12-07 10:55:22 -08:00

16 lines
374 B
Bash

#!/bin/sh
set -e
# Wait for MinIO to be available
until mc alias set myminio http://minio:9000 "$MINIO_ACCESS_KEY" "$MINIO_SECRET_KEY"; do
echo "Waiting for MinIO..."
sleep 1
done
echo "MinIO is ready."
# Create the 'nextcloud-data' bucket if it doesn't already exist.
mc mb myminio/nextcloud-data --ignore-existing
echo "Bucket 'nextcloud-data' is configured."