-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
·40 lines (31 loc) · 1010 Bytes
/
start.sh
File metadata and controls
executable file
·40 lines (31 loc) · 1010 Bytes
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
#!/usr/bin/env bash
# Startup script for ChainFinity Backend
set -e
echo "=== ChainFinity Backend Startup ==="
# Check Python version
echo "Checking Python version..."
python3 --version
# Check if virtual environment exists, create if not
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
echo "Installing dependencies..."
pip install --quiet --upgrade pip
pip install --quiet -r requirements.txt
# Check if .env exists
if [ ! -f ".env" ]; then
echo "Warning: .env file not found. Using default settings."
echo "Please create .env file from .env.example for production use."
fi
echo ""
echo "=== Starting ChainFinity Backend ==="
echo "API will be available at: http://localhost:8000"
echo "API Documentation: http://localhost:8000/docs"
echo ""
# Start the application
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload