File size: 1,725 Bytes
d6d843f |
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 |
#!/bin/bash
###############################################################################
# Crypto Data Bank Startup Script
# راهاندازی بانک اطلاعاتی رمزارز
###############################################################################
echo "========================================================================"
echo "🏦 Crypto Data Bank - Starting..."
echo "========================================================================"
# Create data directory if it doesn't exist
mkdir -p data
# Check if virtual environment exists
if [ ! -d "venv_crypto_bank" ]; then
echo "📦 Creating virtual environment..."
python3 -m venv venv_crypto_bank
fi
# Activate virtual environment
echo "🔄 Activating virtual environment..."
source venv_crypto_bank/bin/activate
# Install/upgrade requirements
echo "📥 Installing dependencies..."
pip install --upgrade pip > /dev/null 2>&1
pip install -r crypto_data_bank/requirements.txt > /dev/null 2>&1
# Check installation
if [ $? -ne 0 ]; then
echo "❌ Failed to install dependencies"
exit 1
fi
echo "✅ Dependencies installed"
echo ""
# Start the API Gateway
echo "========================================================================"
echo "🚀 Starting Crypto Data Bank API Gateway..."
echo "========================================================================"
echo ""
echo "📍 API URL: http://localhost:8888"
echo "📖 Documentation: http://localhost:8888/docs"
echo "📊 API Info: http://localhost:8888"
echo ""
echo "Press Ctrl+C to stop the server"
echo "========================================================================"
echo ""
# Run the API Gateway
cd crypto_data_bank
python api_gateway.py
|