fix video label
This commit is contained in:
24
fish_api/start_no_fresh.sh
Executable file
24
fish_api/start_no_fresh.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
# 启动 Fish API(uvicorn),不执行 prestart_fresh,保留 SQLite 与 measure/action 缓存。
|
||||
#
|
||||
# bash fish_api/start_no_fresh.sh
|
||||
# PORT=8001 HOST=0.0.0.0 bash fish_api/start_no_fresh.sh
|
||||
#
|
||||
# 首次使用请先:cd fish_api && uv sync
|
||||
#
|
||||
set -euo pipefail
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
cd "$DIR"
|
||||
|
||||
export PUBLIC_BASE_URL="${PUBLIC_BASE_URL:-http://127.0.0.1:8000}"
|
||||
unset PYTHON_FISH_MEASURE PYTHON_FISH_ACTION 2>/dev/null || true
|
||||
|
||||
PORT="${PORT:-8000}"
|
||||
HOST="${HOST:-0.0.0.0}"
|
||||
|
||||
if command -v uv >/dev/null 2>&1; then
|
||||
exec uv run uvicorn app.main:app --host "$HOST" --port "$PORT"
|
||||
else
|
||||
exec uvicorn app.main:app --host "$HOST" --port "$PORT"
|
||||
fi
|
||||
Reference in New Issue
Block a user