-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathupdate-env.sh
More file actions
executable file
·33 lines (27 loc) · 1.05 KB
/
update-env.sh
File metadata and controls
executable file
·33 lines (27 loc) · 1.05 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
#!/bin/bash
# Script to update .env file with Supabase credentials
echo "🔧 Updating .env file with Supabase credentials..."
# Check if .env file exists
if [ ! -f "frontend/.env" ]; then
echo "❌ .env file not found. Creating it..."
cat > frontend/.env << 'EOF'
# Supabase Configuration
VITE_SUPABASE_URL=your_supabase_url_here
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key_here
# API Configuration
VITE_API_BASE_URL=http://localhost:8000
EOF
fi
echo "📝 Current .env file:"
cat frontend/.env
echo ""
echo "🔧 To update with your credentials:"
echo "1. Get your Supabase URL and anon key from your Supabase dashboard"
echo "2. Run: nano frontend/.env"
echo "3. Replace 'your_supabase_url_here' with your Project URL"
echo "4. Replace 'your_supabase_anon_key_here' with your anon key"
echo "5. Save and exit (Ctrl+X, Y, Enter)"
echo ""
echo "📖 Or use this command (replace with your actual values):"
echo "sed -i '' 's/your_supabase_url_here/YOUR_ACTUAL_URL/g' frontend/.env"
echo "sed -i '' 's/your_supabase_anon_key_here/YOUR_ACTUAL_KEY/g' frontend/.env"