gsearch-api / start.sh
tanmayapna's picture
initial deploy
6fc17e7
Raw
History Blame Contribute Delete
1.26 kB
#!/usr/bin/env bash
# ─────────────────────────────────────────────────────────────────
# GCAS Search Engine – Quick-start script
# Usage: bash start.sh
# ─────────────────────────────────────────────────────────────────
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
# 1. Create virtual environment if it doesn't exist
if [ ! -d ".venv" ]; then
echo "Creating virtual environment..."
python3 -m venv .venv
fi
# 2. Activate it
source .venv/bin/activate
# 3. Install / upgrade dependencies
echo "Installing dependencies..."
pip install --quiet --upgrade pip
pip install --quiet -r requirements.txt
# 4. Copy .env.example to .env if .env is missing
if [ ! -f ".env" ]; then
cp .env.example .env
echo ""
echo "⚠️ .env file created from .env.example"
echo " Edit it to set EXCEL_FOLDER, API keys, etc., then re-run this script."
echo ""
fi
# 5. Launch the server
echo "Starting GCAS Search Engine on http://0.0.0.0:8000 ..."
python main.py