16 lines
403 B
Bash
16 lines
403 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
cd "$ROOT/backend"
|
|
|
|
if [[ ! -d .venv ]]; then
|
|
python3 -m venv .venv
|
|
fi
|
|
# shellcheck source=/dev/null
|
|
source .venv/bin/activate
|
|
pip install -r requirements.txt
|
|
if [[ ! -f .env ]]; then
|
|
cp .env.example .env
|
|
echo "Created backend/.env from .env.example"
|
|
fi
|
|
exec uvicorn app.main:app --reload --host 127.0.0.1 --port 8000
|