Files

15 lines
451 B
Bash
Raw Permalink 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
# vps-manager 启动脚本(部署于 Tailscale cc1 节点 100.89.0.11
# 用法:./run.sh # 前台启动
# ./run.sh --reload # 开发模式(热重载)
cd "$(dirname "$0")" || exit 1
if [ ! -d ".venv" ]; then
echo "[init] 创建虚拟环境并安装依赖..."
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
fi
exec .venv/bin/uvicorn app.main:app --host 0.0.0.0 --port 8000 "$@"