| 123456789101112131415161718192021222324 |
- #!/bin/bash
- # CRM Python Backend Start Script
- SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
- cd "$SCRIPT_DIR"
- # Create venv if not exists
- if [ ! -d ".venv" ]; then
- echo "Creating virtual environment..."
- python3 -m venv .venv
- fi
- source .venv/bin/activate
- # Install dependencies
- echo "Installing dependencies..."
- pip install -r requirements.txt -q
- # Start server
- echo "Starting CRM Backend on port $(grep APP_PORT .env | cut -d= -f2 || echo 8080)..."
- python -m uvicorn app.main:app \
- --host "$(grep APP_HOST .env | cut -d= -f2 || echo '0.0.0.0')" \
- --port "$(grep APP_PORT .env | cut -d= -f2 || echo 8080)" \
- --reload
|