chore: production docker + compose for LAN deployment
This commit is contained in:
@@ -55,8 +55,9 @@ def create_app() -> Flask:
|
||||
|
||||
|
||||
def _configure_logging(app: Flask) -> None:
|
||||
os.makedirs(os.path.join(app.root_path, "..", "logs"), exist_ok=True)
|
||||
log_path = os.path.abspath(os.path.join(app.root_path, "..", "logs", "system.log"))
|
||||
log_dir = app.config.get("LOG_DIR") or os.path.abspath(os.path.join(app.root_path, "..", "logs"))
|
||||
os.makedirs(log_dir, exist_ok=True)
|
||||
log_path = os.path.abspath(os.path.join(log_dir, "system.log"))
|
||||
handler = RotatingFileHandler(log_path, maxBytes=2_000_000, backupCount=3)
|
||||
fmt = logging.Formatter("%(asctime)s %(levelname)s %(name)s: %(message)s")
|
||||
handler.setFormatter(fmt)
|
||||
|
||||
Reference in New Issue
Block a user