增加支持docker部署

This commit is contained in:
oficcejo
2025-10-09 08:01:06 +08:00
parent 0c11a7b010
commit 64e7617c8c
18 changed files with 920 additions and 1585 deletions
+4
View File
@@ -7,6 +7,10 @@ class StockAnalysisDatabase:
def __init__(self, db_path="stock_analysis.db"):
"""初始化数据库连接"""
self.db_path = db_path
# 确保数据库所在目录存在
db_dir = os.path.dirname(self.db_path)
if db_dir and not os.path.exists(db_dir):
os.makedirs(db_dir, exist_ok=True)
self.init_database()
def init_database(self):