Files
gitlab-instance-0a899031_do…/start.sh
2026-03-28 08:39:12 -05:00

14 lines
411 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# 生产/运维:自动构建前端(若缺失)+ 单进程 uvicornAPI 与静态页同端口)
set -euo pipefail
cd "$(dirname "$0")"
export HOST="${HOST:-0.0.0.0}"
export PORT="${PORT:-8001}"
if [[ -x ".venv/bin/python" ]]; then
PY=".venv/bin/python"
else
PY=python3
command -v python3 >/dev/null 2>&1 || PY=python
fi
exec "$PY" scripts/launch.py --host "$HOST" --port "$PORT"