File size: 1,264 Bytes
6fc17e7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/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