From 109efed4458cd754f2191fd4cb7f2e8b1f640662 Mon Sep 17 00:00:00 2001 From: Geert Rademakes Date: Wed, 6 Aug 2025 13:45:30 +0200 Subject: [PATCH] feat: Add quick start script for S3 demo setup --- start-s3-demo.sh | 91 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100755 start-s3-demo.sh diff --git a/start-s3-demo.sh b/start-s3-demo.sh new file mode 100755 index 0000000..8d5b67a --- /dev/null +++ b/start-s3-demo.sh @@ -0,0 +1,91 @@ +#!/bin/bash + +echo "๐ŸŽต Starting S3 Music Storage Demo" +echo "==================================" + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +NC='\033[0m' # No Color + +# Function to print colored output +print_status() { + echo -e "${BLUE}[INFO]${NC} $1" +} + +print_success() { + echo -e "${GREEN}[SUCCESS]${NC} $1" +} + +print_warning() { + echo -e "${YELLOW}[WARNING]${NC} $1" +} + +print_error() { + echo -e "${RED}[ERROR]${NC} $1" +} + +# Check if Docker is running +if ! docker info > /dev/null 2>&1; then + print_error "Docker is not running. Please start Docker and try again." + exit 1 +fi + +print_status "Starting MinIO and MongoDB services..." +docker-compose -f docker-compose.dev.yml up -d + +# Wait for services to be ready +print_status "Waiting for services to be ready..." +sleep 10 + +# Check if MinIO is running +if docker ps | grep -q minio; then + print_success "MinIO is running" +else + print_error "MinIO failed to start" + exit 1 +fi + +# Check if MongoDB is running +if docker ps | grep -q mongo; then + print_success "MongoDB is running" +else + print_error "MongoDB failed to start" + exit 1 +fi + +print_status "Installing backend dependencies..." +cd packages/backend +npm install + +print_status "Testing S3 connection..." +if node test-s3.js; then + print_success "S3 connection test passed" +else + print_warning "S3 connection test failed - this is normal if MinIO is still starting up" +fi + +print_status "Installing frontend dependencies..." +cd ../frontend +npm install + +print_success "Setup complete!" +echo "" +echo "๐Ÿš€ Next steps:" +echo "1. Start the backend: cd packages/backend && npm run dev" +echo "2. Start the frontend: cd packages/frontend && npm run dev" +echo "3. Access MinIO console: http://localhost:9001 (admin/admin)" +echo "4. Test the application: http://localhost:5173" +echo "" +echo "๐Ÿ“š Documentation:" +echo "- S3_STORAGE_README.md - Complete feature documentation" +echo "- IMPLEMENTATION_SUMMARY.md - Implementation overview" +echo "" +echo "๐Ÿงช Testing:" +echo "- Upload music files through the web interface" +echo "- Test playback functionality" +echo "- Check MinIO console for stored files" +echo "" +print_success "Happy testing! ๐ŸŽต" \ No newline at end of file