aiverse / entrypoint.sh
junaidte14's picture
aiverse backend to hf
3821102
Raw History Blame Contribute Delete
456 Bytes
#!/bin/bash
set -e
# Hugging Face defaults to port 7860 if not specified
APP_PORT=${PORT:-7860}
echo "📦 Running migrations..."
# Note: Ensure your DB connection string is set in HF Space Secrets
alembic upgrade head
echo "🚀 Starting FastAPI on port $APP_PORT (Lean Mode)..."
# Keep workers=1 to stay within the CPU/RAM efficiency lane
exec uvicorn app.main:app \
--host 0.0.0.0 \
--port "$APP_PORT" \
--workers 1 \
--log-level info