start.sh
1 #!/bin/bash 2 # Start the development server 3 4 # Exit on error 5 set -e 6 7 # Set environment variables 8 export PYTHONPATH=$PWD 9 10 # Check if virtual environment exists 11 if [ ! -d "venv" ]; then 12 echo "Error: Virtual environment not found. Please run setup.py first." 13 exit 1 14 fi 15 16 # Activate virtual environment 17 if [ -f "venv/bin/activate" ]; then 18 source venv/bin/activate 19 else 20 source venv/Scripts/activate 21 fi 22 23 # Install development dependencies 24 pip install -r requirements/dev.txt 25 26 # Run database migrations 27 alembic upgrade head 28 29 # Start the development server 30 echo "Starting development server..." 31 uvicorn sussro_services.main:app --reload --host 0.0.0.0 --port 8000