elmeg-demo/backend/start.sh

17 lines
455 B
Bash

#!/bin/bash
set -e
echo "🔄 Running database migrations..."
# Run any migration scripts that exist
for script in /app/migrations/*.py; do
if [ -f "$script" ]; then
echo " Running: $(basename $script)"
python "$script" || echo " ⚠️ Migration $script failed (may already be applied)"
fi
done
echo "✅ Migrations complete. Starting server..."
# Start the main application
exec uvicorn main:app --host 0.0.0.0 --port 8000