增加支持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
+5
View File
@@ -2,12 +2,17 @@ import sqlite3
import json
from datetime import datetime
from typing import Dict, List, Optional
import os
class StockMonitorDatabase:
"""股票监测数据库管理类"""
def __init__(self, db_path: str = "stock_monitor.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):