#!/bin/bash # Development startup script for Virtual Board Member AI System set -e echo "🚀 Starting Virtual Board Member AI System (Development Mode)" # Check if Docker is running if ! docker info > /dev/null 2>&1; then echo "❌ Docker is not running. Please start Docker and try again." exit 1 fi # Check if .env file exists if [ ! -f .env ]; then echo "📝 Creating .env file from template..." cp env.example .env echo "⚠️ Please update .env file with your configuration before continuing." echo " You can edit .env file and run this script again." exit 1 fi # Create necessary directories echo "📁 Creating necessary directories..." mkdir -p logs uploads temp # Start services with Docker Compose echo "🐳 Starting services with Docker Compose..." docker-compose -f docker-compose.dev.yml up -d # Wait for services to be ready echo "⏳ Waiting for services to be ready..." sleep 30 # Check if services are healthy echo "🔍 Checking service health..." if ! docker-compose -f docker-compose.dev.yml ps | grep -q "healthy"; then echo "⚠️ Some services may not be fully ready. Check with: docker-compose -f docker-compose.dev.yml ps" fi # Install Python dependencies (if not in container) if [ ! -d ".venv" ]; then echo "🐍 Setting up Python environment..." python -m venv .venv source .venv/bin/activate pip install poetry poetry install else echo "🐍 Python environment already exists." fi echo "✅ Virtual Board Member AI System is starting up!" echo "" echo "📊 Service URLs:" echo " - Application: http://localhost:8000" echo " - API Documentation: http://localhost:8000/docs" echo " - Health Check: http://localhost:8000/health" echo " - Grafana: http://localhost:3000 (admin/admin)" echo " - Prometheus: http://localhost:9090" echo " - Kibana: http://localhost:5601" echo " - Jaeger: http://localhost:16686" echo " - MinIO Console: http://localhost:9001 (minioadmin/minioadmin)" echo "" echo "📝 To view logs: docker-compose -f docker-compose.dev.yml logs -f" echo "🛑 To stop services: docker-compose -f docker-compose.dev.yml down" echo "" echo "🎉 Development environment is ready!"