feat: add FastAPI manager API compatibility baseline

This commit is contained in:
Tyke Chen
2026-07-20 17:00:13 +08:00
parent 7c58fa37b2
commit 804ddb51f2
140 changed files with 47169 additions and 1 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/bin/sh
set -eu
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
PROJECT_DIR=$(CDPATH= cd -- "${SCRIPT_DIR}/.." && pwd)
PYTHON="${PYTHON_BIN:-${PROJECT_DIR}/.venv/bin/python}"
if [ ! -x "${PYTHON}" ]; then
echo "Python environment is missing; run 'uv sync --locked' in ${PROJECT_DIR}" >&2
exit 1
fi
cd "${PROJECT_DIR}"
exec "${PYTHON}" -m uvicorn app.main:app \
--host "${APP_HOST:-0.0.0.0}" \
--port "${APP_PORT:-8002}" \
--workers "${APP_WORKERS:-1}" \
--timeout-graceful-shutdown "${APP_GRACEFUL_SHUTDOWN_SECONDS:-30}" \
--proxy-headers \
--forwarded-allow-ips "${APP_FORWARDED_ALLOW_IPS:-127.0.0.1}"