-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
·48 lines (37 loc) · 1.17 KB
/
start.sh
File metadata and controls
executable file
·48 lines (37 loc) · 1.17 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
#!/bin/bash
# ShortsCreator API Startup Script
set -e
echo "🎬 Starting ShortsCreator Video Editor API..."
# Check if Python 3 is available
if ! command -v python3 &> /dev/null; then
echo "❌ Python 3 is required but not installed"
exit 1
fi
# Check if virtual environment exists
if [ ! -d "venv" ]; then
echo "📦 Creating virtual environment..."
python3 -m venv venv
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
# Create necessary directories
echo "📁 Creating directories..."
mkdir -p temp uploads jobs static
# Check if ffmpeg is installed
if ! command -v ffmpeg &> /dev/null; then
echo "⚠️ Warning: FFmpeg is not installed. Video processing may not work."
echo "Please install FFmpeg:"
echo " macOS: brew install ffmpeg"
echo " Ubuntu: sudo apt-get install ffmpeg"
echo " Windows: Download from https://ffmpeg.org/download.html"
fi
# Start the application
echo "🚀 Starting Flask application..."
python app.py