fix:优化服务
This commit is contained in:
21
video_worker/scripts/run_ws_service.sh
Executable file
21
video_worker/scripts/run_ws_service.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
cd "$ROOT_DIR"
|
||||
|
||||
if [ ! -d .venv ]; then
|
||||
echo "[ERROR] .venv not found, run install script first"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -f .env ]; then
|
||||
echo "[ERROR] .env not found, copy from .env.example"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source .venv/bin/activate
|
||||
set -a
|
||||
source .env
|
||||
set +a
|
||||
|
||||
python -m uvicorn app.ws_service:app --host "${WS_GATEWAY_HOST:-0.0.0.0}" --port "${WS_GATEWAY_PORT:-8010}"
|
||||
Reference in New Issue
Block a user