juzer09 commited on
Commit
ef71df5
Β·
verified Β·
1 Parent(s): cb351ee

Delete deploy.ps1

Browse files
Files changed (1) hide show
  1. deploy.ps1 +0 -68
deploy.ps1 DELETED
@@ -1,68 +0,0 @@
1
- # Madverse Music Deployment Script for Windows
2
- # Run with: .\deploy.ps1
3
-
4
- Write-Host "🎡 Deploying Madverse Music API..." -ForegroundColor Cyan
5
-
6
- # Check if Docker is installed
7
- try {
8
- docker --version | Out-Null
9
- Write-Host "βœ… Docker found" -ForegroundColor Green
10
- } catch {
11
- Write-Host "❌ Docker is not installed. Please install Docker Desktop first." -ForegroundColor Red
12
- exit 1
13
- }
14
-
15
- # Check if docker-compose is installed
16
- try {
17
- docker-compose --version | Out-Null
18
- Write-Host "βœ… Docker Compose found" -ForegroundColor Green
19
- } catch {
20
- Write-Host "❌ Docker Compose is not installed. Please install Docker Desktop with Compose." -ForegroundColor Red
21
- exit 1
22
- }
23
-
24
- # Set environment variables
25
- if (-not $env:MADVERSE_API_KEY) {
26
- $env:MADVERSE_API_KEY = "madverse-music-api-key-2024"
27
- }
28
-
29
- Write-Host "πŸ”§ Building Docker image..." -ForegroundColor Yellow
30
- docker-compose build
31
-
32
- if ($LASTEXITCODE -ne 0) {
33
- Write-Host "❌ Failed to build Docker image" -ForegroundColor Red
34
- exit 1
35
- }
36
-
37
- Write-Host "πŸš€ Starting services..." -ForegroundColor Yellow
38
- docker-compose up -d
39
-
40
- if ($LASTEXITCODE -ne 0) {
41
- Write-Host "❌ Failed to start services" -ForegroundColor Red
42
- exit 1
43
- }
44
-
45
- Write-Host "⏳ Waiting for services to be healthy..." -ForegroundColor Yellow
46
- Start-Sleep -Seconds 30
47
-
48
- # Test the API
49
- Write-Host "πŸ§ͺ Testing API health..." -ForegroundColor Yellow
50
- try {
51
- $response = Invoke-WebRequest -Uri "http://localhost:8000/health" -Method GET -TimeoutSec 10
52
- if ($response.StatusCode -eq 200) {
53
- Write-Host "βœ… API is healthy and running!" -ForegroundColor Green
54
- Write-Host "πŸ“ API URL: http://localhost:8000" -ForegroundColor Cyan
55
- Write-Host "πŸ“– API Docs: http://localhost:8000/" -ForegroundColor Cyan
56
- Write-Host "πŸ”‘ API Key: $env:MADVERSE_API_KEY" -ForegroundColor Cyan
57
- } else {
58
- throw "Health check failed"
59
- }
60
- } catch {
61
- Write-Host "❌ API health check failed. Check logs:" -ForegroundColor Red
62
- docker-compose logs madverse-api
63
- exit 1
64
- }
65
-
66
- Write-Host ""
67
- Write-Host "🎯 Quick Test Command:" -ForegroundColor Yellow
68
- Write-Host "Invoke-RestMethod -Uri 'http://localhost:8000/analyze' -Method POST -Headers @{'X-API-Key'='$env:MADVERSE_API_KEY'; 'Content-Type'='application/json'} -Body '{`"urls`": [`"https://example.com/song.mp3`"]}'" -ForegroundColor Gray