feat: Add Docker support, GitHub Actions CI, and an MIT License, updating READMEs with deployment instructions and badges.
This commit is contained in:
+29
-7
@@ -1,7 +1,9 @@
|
||||
# 🌡️ PolyWeather: 智能天气量化分析机器人
|
||||
|
||||
[](https://github.com/yangyuan-zhen/PolyWeather/actions/workflows/python-app.yml)
|
||||
[](https://www.python.org/downloads/)
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
[](https://deepwiki.com/yangyuan-zhen/PolyWeather)
|
||||
|
||||
PolyWeather 是一款专为 **Polymarket** 等预测市场打造的天气分析工具。它通过聚合多源气象预报、实时机场 METAR 观测,并引入数学概率模型与 AI 决策支持,帮助用户更科学地评估天气博弈风险。
|
||||
|
||||
<p align="center">
|
||||
@@ -74,15 +76,35 @@ PolyWeather 是一款专为 **Polymarket** 等预测市场打造的天气分析
|
||||
|
||||
### 环境要求
|
||||
|
||||
- **Python 3.11+**
|
||||
- 依赖安装: `pip install -r requirements.txt`
|
||||
- **环境变量**: 在 `.env` 中设置 `TELEGRAM_BOT_TOKEN` 和 `GROQ_API_KEY`。
|
||||
- **Python 3.11+** 或 **Docker & Docker Compose**
|
||||
- **环境变量**: 在 `.env` 中设置关键参数(参考 `.env.example`)。
|
||||
|
||||
### VPS 快捷部署
|
||||
### 🐳 Docker 推荐部署 (推荐)
|
||||
|
||||
1. 克隆仓库并安装依赖。
|
||||
最简单、稳定的部署方式,避免系统依赖冲突。
|
||||
|
||||
1. **克隆项目并配置环境**
|
||||
```bash
|
||||
git clone https://github.com/yangyuan-zhen/PolyWeather.git
|
||||
cd PolyWeather
|
||||
cp .env.example .env
|
||||
# 编辑 .env 文件填入 TELEGRAM_BOT_TOKEN 和 GROQ_API_KEY 等
|
||||
nano .env
|
||||
```
|
||||
2. **后台一键启动服务**
|
||||
```bash
|
||||
docker-compose up -d --build
|
||||
```
|
||||
3. **查看实时日志**
|
||||
```bash
|
||||
docker-compose logs -f
|
||||
```
|
||||
|
||||
### 💻 传统 VPS 部署方案
|
||||
|
||||
1. 安装依赖: `pip install -r requirements.txt`
|
||||
2. 配置 `.env` 文件。
|
||||
3. 使用以下脚本实现一键更新与重启:
|
||||
3. 使用以下脚本实现一键更新与重启(仅适用于后台 `nohup` 运行):
|
||||
|
||||
```bash
|
||||
cat > ~/update.sh << 'EOF'
|
||||
|
||||
Reference in New Issue
Block a user