Spaces:
Sleeping
Sleeping
Delete deploy.sh
Browse files
deploy.sh
DELETED
@@ -1,51 +0,0 @@
|
|
1 |
-
#!/bin/bash
|
2 |
-
|
3 |
-
# Madverse Music Deployment Script
|
4 |
-
|
5 |
-
set -e
|
6 |
-
|
7 |
-
echo "π΅ Deploying Madverse Music API..."
|
8 |
-
|
9 |
-
# Check if Docker is installed
|
10 |
-
if ! command -v docker &> /dev/null; then
|
11 |
-
echo "β Docker is not installed. Please install Docker first."
|
12 |
-
exit 1
|
13 |
-
fi
|
14 |
-
|
15 |
-
# Check if docker-compose is installed
|
16 |
-
if ! command -v docker-compose &> /dev/null; then
|
17 |
-
echo "β Docker Compose is not installed. Please install Docker Compose first."
|
18 |
-
exit 1
|
19 |
-
fi
|
20 |
-
|
21 |
-
# Set environment variables
|
22 |
-
export MADVERSE_API_KEY=${MADVERSE_API_KEY:-madverse-music-api-key-2024}
|
23 |
-
|
24 |
-
echo "π§ Building Docker image..."
|
25 |
-
docker-compose build
|
26 |
-
|
27 |
-
echo "π Starting services..."
|
28 |
-
docker-compose up -d
|
29 |
-
|
30 |
-
echo "β³ Waiting for services to be healthy..."
|
31 |
-
sleep 30
|
32 |
-
|
33 |
-
# Test the API
|
34 |
-
echo "π§ͺ Testing API health..."
|
35 |
-
if curl -f http://localhost:8000/health > /dev/null 2>&1; then
|
36 |
-
echo "β
API is healthy and running!"
|
37 |
-
echo "π API URL: http://localhost:8000"
|
38 |
-
echo "π API Docs: http://localhost:8000/"
|
39 |
-
echo "π API Key: $MADVERSE_API_KEY"
|
40 |
-
else
|
41 |
-
echo "β API health check failed. Check logs:"
|
42 |
-
docker-compose logs madverse-api
|
43 |
-
exit 1
|
44 |
-
fi
|
45 |
-
|
46 |
-
echo ""
|
47 |
-
echo "π― Quick Test:"
|
48 |
-
echo "curl -X POST 'http://localhost:8000/analyze' \\"
|
49 |
-
echo " -H 'X-API-Key: $MADVERSE_API_KEY' \\"
|
50 |
-
echo " -H 'Content-Type: application/json' \\"
|
51 |
-
echo " -d '{\"urls\": [\"https://example.com/song.mp3\"]}'"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|