Spaces:
Build error
Build error
| # Setup script for AudioForge backend (Windows PowerShell) | |
| Write-Host "🎵 AudioForge Backend Setup" -ForegroundColor Cyan | |
| Write-Host "============================" -ForegroundColor Cyan | |
| # Check Python version | |
| $pythonVersion = python --version 2>&1 | |
| Write-Host "Python version: $pythonVersion" | |
| # Create virtual environment | |
| if (-not (Test-Path ".venv")) { | |
| Write-Host "Creating virtual environment..." -ForegroundColor Yellow | |
| python -m venv .venv | |
| } | |
| # Activate virtual environment | |
| Write-Host "Activating virtual environment..." -ForegroundColor Yellow | |
| & .\.venv\Scripts\Activate.ps1 | |
| # Install uv if not present | |
| if (-not (Get-Command uv -ErrorAction SilentlyContinue)) { | |
| Write-Host "Installing uv..." -ForegroundColor Yellow | |
| pip install uv | |
| } | |
| # Install dependencies | |
| Write-Host "Installing dependencies..." -ForegroundColor Yellow | |
| uv pip install -e ".[dev]" | |
| # Create .env file if it doesn't exist | |
| if (-not (Test-Path ".env")) { | |
| Write-Host "Creating .env file from .env.example..." -ForegroundColor Yellow | |
| Copy-Item .env.example .env | |
| Write-Host "⚠️ Please edit .env with your database and Redis settings" -ForegroundColor Yellow | |
| } | |
| # Create storage directories | |
| Write-Host "Creating storage directories..." -ForegroundColor Yellow | |
| New-Item -ItemType Directory -Force -Path "storage\audio\music" | Out-Null | |
| New-Item -ItemType Directory -Force -Path "storage\audio\vocals" | Out-Null | |
| New-Item -ItemType Directory -Force -Path "storage\audio\mixed" | Out-Null | |
| New-Item -ItemType Directory -Force -Path "storage\audio\mastered" | Out-Null | |
| Write-Host "" | |
| Write-Host "✅ Setup complete!" -ForegroundColor Green | |
| Write-Host "" | |
| Write-Host "Next steps:" | |
| Write-Host "1. Edit .env with your database and Redis URLs" | |
| Write-Host "2. Start PostgreSQL and Redis" | |
| Write-Host "3. Run: alembic upgrade head" | |
| Write-Host "4. Run: uvicorn app.main:app --reload" | |