23 lines
572 B
Bash
Executable File
23 lines
572 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# WatchStack-Schnellstart
|
|
# Legt venv an (falls fehlt), installiert deps, startet uvicorn.
|
|
set -e
|
|
cd "$(dirname "$0")"
|
|
|
|
if [ ! -d ".venv" ]; then
|
|
echo "→ Erzeuge venv …"
|
|
python3 -m venv .venv
|
|
fi
|
|
|
|
# shellcheck disable=SC1091
|
|
source .venv/bin/activate
|
|
|
|
echo "→ Installiere/aktualisiere Abhängigkeiten …"
|
|
pip install -q --upgrade pip
|
|
pip install -q -r requirements.txt
|
|
|
|
HOST="${HOST:-127.0.0.1}"
|
|
PORT="${PORT:-8000}"
|
|
echo "→ Starte WatchStack auf http://${HOST}:${PORT}"
|
|
exec uvicorn app.main:app --reload --host "${HOST}" --port "${PORT}"
|