修正今日

This commit is contained in:
houhuan committed 2025-12-07 23:55:28 +08:00
1 parent 616fe10b02
commit 339f8211e4
5 files changed
+37 -4

No files matched your search

+11
View File
@@ -64,6 +64,17 @@ curl -X PUT http://localhost:5000/api/admin/turnover \
--data-binary @revenue.csv
```
## 本地运行(默认数据库路径)
- 默认数据库:`sqlite:///data/data.db`(项目根目录下的 `data/data.db`)
- 启动:
```powershell
$env:PORT=57778; $env:ADMIN_TOKEN="<你的口令>"; python backend/app.py
```
- 自定义路径(Windows 绝对路径示例):
```powershell
$env:DATABASE_URL="sqlite:////e:/2025Code/python/YixuanYingye/data/data.db"; python backend/app.py
```
## 环境优化(最优解)
- 基础镜像切换为 `python:3.11-alpine`,构建更快、体积更小
- 依赖安装走腾讯云 PyPI 镜像:`PIP_INDEX_URL=https://mirrors.cloud.tencent.com/pypi/simple`