-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·58 lines (48 loc) · 1.59 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·58 lines (48 loc) · 1.59 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
#!/bin/bash
# Google Cloud Storage File Manager Setup Script
echo "🚀 Setting up Google Cloud Storage File Manager..."
# Check if Python 3 is installed
if ! command -v python3 &> /dev/null; then
echo "❌ Python 3 is not installed. Please install Python 3.7 or higher."
exit 1
fi
echo "✅ Python 3 found: $(python3 --version)"
# Create virtual environment if it doesn't exist
if [ ! -d "venv" ]; then
echo "📦 Creating virtual environment..."
python3 -m venv venv
echo "✅ Virtual environment created"
else
echo "✅ Virtual environment already exists"
fi
# Activate virtual environment
echo "🔧 Activating virtual environment..."
source venv/bin/activate
# Upgrade pip
echo "⬆️ Upgrading pip..."
pip install --upgrade pip
# Install dependencies
echo "📚 Installing dependencies..."
pip install -r requirements.txt
echo "✅ Dependencies installed successfully"
# Check if .env file exists
if [ ! -f ".env" ]; then
echo "⚠️ .env file not found!"
echo "📝 Please create a .env file with the following variables:"
echo ""
echo "GOOGLE_APPLICATION_CREDENTIALS_JSON_BASE64=your_base64_encoded_service_account_json"
echo "PHOTO_STORAGE_BUCKET=your-bucket-name"
echo "PUBLIC_BUCKET=your-public-bucket-name"
echo ""
echo "See README.md for detailed instructions."
else
echo "✅ .env file found"
fi
echo ""
echo "🎉 Setup complete!"
echo ""
echo "To run the application:"
echo "1. Activate virtual environment: source venv/bin/activate"
echo "2. Run the application: python main.py"
echo ""
echo "For detailed instructions, see README.md"