增加支持docker部署
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user