fix: docker-compose 持久化 SQLite 数据库; 迁移 DB 路径到 data/ 子目录

- docker-compose.yml: bind mount → named volume (auv_data:/app/data)
- backend/database.py: DB_PATH 改为 data/stock_data.db,自动迁移旧数据库
- .gitignore: 忽略 *.db 文件

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Sakurasan
2026-07-06 23:59:25 +08:00
co-authored by Claude Opus 4.7
parent 6390545e61
commit 5153fa28de
4 changed files with 19 additions and 1 deletions
+5
View File
@@ -7,3 +7,8 @@ services:
env_file:
- .env
restart: unless-stopped
volumes:
- auv_data:/app/data
volumes:
auv_data: