Files
devbox-web/devbox-back/run.sh

49 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# DevBox Email Collection API - Simple Startup Script
echo "🚀 Starting DevBox Email Collection API..."
# Check if Python 3 is available
if ! command -v python3 &> /dev/null; then
echo "❌ Error: python3 not found"
echo "Please install Python 3"
exit 1
fi
echo "✅ Found Python: $(python3 --version)"
# Check if we're in the right directory
if [ ! -f "requirements.txt" ]; then
echo "❌ Error: requirements.txt not found!"
echo "Please run this script from the project root directory."
exit 1
fi
# Create virtual environment if it doesn't exist
if [ ! -d "venv" ]; then
echo "📦 Creating virtual environment..."
python3 -m venv venv
fi
# Activate virtual environment
echo "🔧 Activating virtual environment..."
source venv/bin/activate
# Install dependencies from requirements.txt
echo "📚 Installing dependencies from requirements.txt..."
pip install --upgrade pip
pip install -r requirements.txt
echo ""
echo "🎉 Setup complete!"
echo "📍 API will be available at: http://localhost:8000"
echo "📖 API documentation at: http://localhost:8000/docs"
echo ""
echo "🚀 Starting server..."
echo "💡 Press Ctrl+C to stop"
echo ""
# Start the application
python main.py --dev