File size: 4,480 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# ============================================
# AudioForge - Quick Demo Launch
# ============================================
# Fast startup for live demonstrations

# Colors
$ESC = [char]27
$GREEN = "$ESC[32m"
$CYAN = "$ESC[36m"
$MAGENTA = "$ESC[35m"
$YELLOW = "$ESC[33m"
$RESET = "$ESC[0m"
$BOLD = "$ESC[1m"

Clear-Host
Write-Host ""
Write-Host "${CYAN}${BOLD}╔═══════════════════════════════════════════════════════════════╗${RESET}"
Write-Host "${CYAN}${BOLD}β•‘                                                               β•‘${RESET}"
Write-Host "${CYAN}${BOLD}β•‘                    ${MAGENTA}🎡 AUDIOFORGE 🎡${CYAN}                        β•‘${RESET}"
Write-Host "${CYAN}${BOLD}β•‘                                                               β•‘${RESET}"
Write-Host "${CYAN}${BOLD}β•‘          ${RESET}Open-Source Text-to-Music Generation Platform${CYAN}        β•‘${RESET}"
Write-Host "${CYAN}${BOLD}β•‘                                                               β•‘${RESET}"
Write-Host "${CYAN}${BOLD}β•‘              ${GREEN}πŸš€ QUICK DEMO LAUNCHER πŸš€${CYAN}                     β•‘${RESET}"
Write-Host "${CYAN}${BOLD}β•‘                                                               β•‘${RESET}"
Write-Host "${CYAN}${BOLD}β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•${RESET}"
Write-Host ""

Write-Host "${CYAN}[1/5]${RESET} Checking Docker..." -NoNewline
try {
    docker ps | Out-Null
    Write-Host " ${GREEN}βœ“${RESET}"
} catch {
    Write-Host " ${RED}βœ—${RESET}"
    Write-Host "${RED}Error: Docker is not running. Please start Docker Desktop.${RESET}"
    exit 1
}

Write-Host "${CYAN}[2/5]${RESET} Stopping any existing AudioForge containers..." -NoNewline
docker-compose -f docker-compose.dev.yml down 2>$null | Out-Null
Write-Host " ${GREEN}βœ“${RESET}"

Write-Host "${CYAN}[3/5]${RESET} Starting database services..." -NoNewline
docker-compose -f docker-compose.dev.yml up -d postgres redis 2>&1 | Out-Null
Start-Sleep -Seconds 10
Write-Host " ${GREEN}βœ“${RESET}"

Write-Host "${CYAN}[4/5]${RESET} Starting backend API..." -NoNewline
docker-compose -f docker-compose.dev.yml up -d backend 2>&1 | Out-Null
Start-Sleep -Seconds 15
Write-Host " ${GREEN}βœ“${RESET}"

Write-Host "${CYAN}[5/5]${RESET} Starting frontend..." -NoNewline
docker-compose -f docker-compose.dev.yml up -d frontend 2>&1 | Out-Null
Start-Sleep -Seconds 10
Write-Host " ${GREEN}βœ“${RESET}"

Write-Host ""
Write-Host "${GREEN}${BOLD}═══════════════════════════════════════════════════════════════${RESET}"
Write-Host "${GREEN}${BOLD}                   πŸŽ‰ DEMO IS READY! πŸŽ‰${RESET}"
Write-Host "${GREEN}${BOLD}═══════════════════════════════════════════════════════════════${RESET}"
Write-Host ""

Write-Host "${BOLD}${CYAN}πŸ“± Access Points:${RESET}"
Write-Host "  ${BOLD}Frontend:${RESET}      ${GREEN}http://localhost:3000${RESET}"
Write-Host "  ${BOLD}Backend API:${RESET}   ${GREEN}http://localhost:8001${RESET}"
Write-Host "  ${BOLD}API Docs:${RESET}      ${GREEN}http://localhost:8001/docs${RESET}"
Write-Host ""

Write-Host "${BOLD}${YELLOW}🎯 Demo Script:${RESET}"
Write-Host "  1. Open ${CYAN}http://localhost:3000${RESET}"
Write-Host "  2. Enter prompt: ${GREEN}'Upbeat electronic dance music with heavy bass'${RESET}"
Write-Host "  3. Click ${CYAN}'Generate Music'${RESET}"
Write-Host "  4. Show ${CYAN}API documentation${RESET} at http://localhost:8001/docs"
Write-Host ""

Write-Host "${BOLD}${MAGENTA}πŸ“Š Container Status:${RESET}"
docker-compose -f docker-compose.dev.yml ps

Write-Host ""
Write-Host "${YELLOW}πŸ’‘ Useful Commands:${RESET}"
Write-Host "  View logs:    ${CYAN}docker-compose -f docker-compose.dev.yml logs -f${RESET}"
Write-Host "  Stop demo:    ${CYAN}docker-compose -f docker-compose.dev.yml down${RESET}"
Write-Host "  Restart:      ${CYAN}docker-compose -f docker-compose.dev.yml restart${RESET}"
Write-Host ""