fix:优化pm2配置项
This commit is contained in:
9
crawler/run_uvicorn.sh
Normal file
9
crawler/run_uvicorn.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
# PM2 用:在 crawler 目录下启动 uvicorn(GDELT/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
|
||||
Reference in New Issue
Block a user