fix:优化pm2配置项

This commit is contained in:
Daniel
2026-03-05 19:53:05 +08:00
parent 004b03b374
commit 98d928f457
10 changed files with 125 additions and 10 deletions

9
crawler/run_uvicorn.sh Normal file
View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
# PM2 用:在 crawler 目录下启动 uvicornGDELT/RSS 实时服务 :8000
set -e
cd "$(dirname "$0")"
[ -n "$LANG" ] || export LANG="${LANG:-en_US.UTF-8}"
[ -n "$LC_ALL" ] || export LC_ALL="${LC_ALL:-en_US.UTF-8}"
# 若项目根目录有 .env可在此加载PM2 一般已在 ecosystem 里配 env
if [ -f ../.env ]; then set -a; . ../.env; set +a; fi
exec python3 -m uvicorn realtime_conflict_service:app --host 0.0.0.0 --port 8000