Repository navigation
Expand file tree
/
Copy pathdeploy.sh
More file actions
62 lines (52 loc) · 1.64 KB
/
Copy pathdeploy.sh
File metadata and controls
62 lines (52 loc) · 1.64 KB
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
#!/bin/bash
set -e
echo "🚀 Lecture Transcriber - Vercel Deployment Setup"
echo "================================================"
echo ""
# Check if Vercel CLI is installed
if ! command -v vercel &> /dev/null; then
echo "[WARNING] Vercel CLI not found. Installing..."
npm install -g vercel
fi
echo "📋 Prerequisites Check:"
echo "✓ Node.js version:"
node --version
echo ""
echo "🔑 Setting up environment variables..."
echo ""
echo "You'll need a Groq API key. Get one here:"
echo " 👉 https://console.groq.com/keys"
echo ""
# Read environment variables
read -p "Enter your GROQ_API_KEY: " GROQ_API_KEY
read -p "Enter your GROQ_LLM_API_KEY (or press Enter to use same as above): " GROQ_LLM_API_KEY
if [ -z "$GROQ_LLM_API_KEY" ]; then
GROQ_LLM_API_KEY=$GROQ_API_KEY
fi
# Create .env.local
cat > .env.local << EOF
GROQ_API_KEY=$GROQ_API_KEY
GROQ_LLM_API_KEY=$GROQ_LLM_API_KEY
USE_KV_DATABASE=false
EOF
echo "✅ Created .env.local"
echo ""
echo "🧪 Testing local build..."
npm run build
echo ""
echo "✅ Build successful!"
echo ""
echo "🚀 Ready to deploy to Vercel!"
echo ""
echo "Next steps:"
echo " 1. Make sure all changes are committed to Git"
echo " 2. Run: vercel deploy --prod"
echo " 3. Add environment variables in Vercel dashboard (do NOT paste keys in public places):"
echo " - GROQ_API_KEY (set via Vercel dashboard)"
echo " - GROQ_LLM_API_KEY (set via Vercel dashboard)"
echo ""
echo "For persistent storage, set up Vercel KV:"
echo " 1. Visit: https://vercel.com/dashboard"
echo " 2. Go to your project's Storage tab"
echo " 3. Create a new KV database"
echo " 4. Add the KV environment variables to your project"