Files
pokemon-radar-api/run_pokemon_radar_api.sh
Timmy da5a36e8ad security: 移除 hard-coded FUNCTION_TOKEN,改從 env 讀取
- pokemon_location_fetcher.py:DEFAULT_URL/TOKEN 改走 os.getenv,並補 load_dotenv() 讓 fetch_and_upload.sh 能從 .env 取值
- run_pokemon_radar_api.sh:POKER_* 改為可由環境覆蓋(實務上未被 API 使用,保留結構)
- pyproject.toml:補宣告 python-dotenv(專案已使用但原本未列)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 09:17:24 +08:00

16 lines
426 B
Bash
Executable File
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
cd /opt/pokemon-radar-api
# POKER_* 目前 unusedAPI 只讀 REDIS_*);保留結構,實際值放 .env
export POKER_URL="${POKER_URL:-}"
export POKER_TOKEN="${POKER_TOKEN:-}"
export POKER_SCRIPT="${POKER_SCRIPT:-twpk_radar.mjs}"
# uv run uvicorn pokemon_radar_api:app --host 0.0.0.0 --port 8008
uv run uvicorn pokemon_radar_api:app \
--host 0.0.0.0 \
--port 8008 \
--log-config logging.ini