#!/bin/bash set -e echo "๐Ÿš€ Deploying Virtual Board Member AI System (Development)" # 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 required files exist if [ ! -f ".env" ]; then echo "๐Ÿ“ Creating .env file from template..." cp env.example .env echo "โš ๏ธ Please update .env file with your configuration values" fi # Create necessary directories echo "๐Ÿ“ Creating necessary directories..." mkdir -p logs uploads temp # Build and start services echo "๐Ÿณ Starting Docker services..." docker-compose -f docker-compose.dev.yml down --remove-orphans docker-compose -f docker-compose.dev.yml build --no-cache docker-compose -f docker-compose.dev.yml up -d # Wait for services to be healthy echo "โณ Waiting for services to be ready..." sleep 30 # Check service health echo "๐Ÿ” Checking service health..." docker-compose -f docker-compose.dev.yml ps # Initialize database echo "๐Ÿ—„๏ธ Initializing database..." docker-compose -f docker-compose.dev.yml exec -T postgres psql -U vbm_user -d vbm_db -f /docker-entrypoint-initdb.d/init-db.sql # Install Python dependencies echo "๐Ÿ“ฆ Installing Python dependencies..." if command -v poetry &> /dev/null; then poetry install else echo "โš ๏ธ Poetry not found, using pip..." pip install -r requirements.txt fi # Run database migrations echo "๐Ÿ”„ Running database migrations..." # TODO: Add Alembic migration commands # Run tests echo "๐Ÿงช Running tests..." python -m pytest tests/ -v echo "โœ… Deployment completed successfully!" echo "" echo "๐Ÿ“Š Service URLs:" echo " - Application: http://localhost:8000" echo " - API Documentation: http://localhost:8000/docs" echo " - Health Check: http://localhost:8000/health" echo " - Prometheus: http://localhost:9090" echo " - Grafana: http://localhost:3000" echo " - Kibana: http://localhost:5601" echo " - Jaeger: http://localhost:16686" echo "" echo "๐Ÿ”ง Next steps:" echo " 1. Update .env file with your API keys and configuration" echo " 2. Start the application: poetry run uvicorn app.main:app --reload" echo " 3. Access the API documentation at http://localhost:8000/docs"