add run.sh: one-shot server launch/restart
This commit is contained in:
1 parent
a8426b5922
commit
a27ff5c931
2 files changed
+8
No files matched your search
@@ -2,3 +2,4 @@
|
|||||||
__pycache__/
|
__pycache__/
|
||||||
*.pyc
|
*.pyc
|
||||||
data/
|
data/
|
||||||
|
server.log
|
||||||
@@ -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 $!)"
|
||||||
Reference in new issue
Block a user