add run.sh: one-shot server launch/restart

This commit is contained in:
jozamudi committed 2026-08-19 15:30:02 +00:00
1 parent a8426b5922
commit a27ff5c931
2 files changed
+8

No files matched your search

Executable
+7
View File
@@ -0,0 +1,7 @@
#!/bin/sh
# launch (or restart) the ani-web server
cd "$(dirname "$0")" || exit 1
[ -x .venv/bin/python ] || { echo "no .venv — run: uv venv .venv && uv pip install --python .venv/bin/python -r requirements.txt"; exit 1; }
pkill -f "[u]vicorn app:app" 2>/dev/null; sleep 1
nohup .venv/bin/python -m uvicorn app:app --host 0.0.0.0 --port 8321 > server.log 2>&1 &
echo "ani-web on http://localhost:8321 (pid $!)"