Initial travel knowledge graph release
This commit is contained in:
17
scripts/run_api.sh
Executable file
17
scripts/run_api.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
# Stable runner used by launchd/start.sh for the independent new2 backend.
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
ROOT="$(pwd)"
|
||||
|
||||
env_value() {
|
||||
[ -f "$ROOT/.env" ] || return 0
|
||||
grep -E "^$1=" "$ROOT/.env" | tail -1 | cut -d= -f2-
|
||||
}
|
||||
|
||||
API_PORT="$(env_value API_PORT)"
|
||||
API_PORT="${API_PORT:-8102}"
|
||||
|
||||
export PYTHONUNBUFFERED=1
|
||||
exec python3 -m uvicorn app.main:app --host 0.0.0.0 --port "$API_PORT"
|
||||
Reference in New Issue
Block a user