Spaces:
Build error
Build error
File size: 1,924 Bytes
09fa60b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# 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"
|