#!/bin/bash set -e echo "๐Ÿš€ Service Finder Preโ€‘Start Schema Synchronization" echo "==================================================" # Ensure we are in the correct directory (should be /app inside container) cd /app # Override EMAIL_PROVIDER to smtp for development export EMAIL_PROVIDER=smtp # Run the unified database synchronizer with --apply flag echo "๐Ÿ“ฆ Running unified_db_sync.py --apply..." python -m app.scripts.unified_db_sync --apply # Verify that the sync succeeded if [ $? -eq 0 ]; then echo "โœ… Schema synchronization completed successfully." else echo "โŒ Schema synchronization failed. Exiting." exit 1 fi # Start the FastAPI application echo "๐ŸŒ Starting FastAPI server..." exec uvicorn app.main:app --host 0.0.0.0 --port 8000