chore: production docker + compose for LAN deployment

This commit is contained in:
2026-02-12 11:22:47 +01:00
parent 3a0bb1cd37
commit e1c939799b
9 changed files with 218 additions and 4 deletions

View File

@@ -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)