Initial commit: crypto_key API key manager with PM2 and Ubuntu deploy docs

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-05-19 00:54:27 +08:00
commit 0203a65973
14 changed files with 1140 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
# PM2 启动脚本 (Linux / macOS)
# 用法: chmod +x pm2-start.sh && ./pm2-start.sh
set -e
cd "$(dirname "$0")"
if ! command -v pm2 >/dev/null 2>&1; then
echo "[错误] 未找到 pm2,请先执行: npm install -g pm2"
exit 1
fi
if [ ! -f "venv/bin/python" ]; then
echo "[警告] 未检测到 venv,请先: python3 -m venv venv && source venv/bin/activate && pip install -r requirements.txt"
fi
mkdir -p logs
pm2 start ecosystem.config.cjs
pm2 save 2>/dev/null || true
echo ""
echo "已启动。访问: http://127.0.0.1:5200"
echo "查看状态: pm2 status"
echo "查看日志: pm2 logs api-key-manager"