remove dependency to MariaDB

This commit is contained in:
2025-06-01 19:56:01 +02:00
parent 370738ff14
commit 076466b895
9 changed files with 578 additions and 633 deletions
+1 -3
View File
@@ -1,8 +1,7 @@
## ------------------------------- Builder Stage ------------------------------ ##
FROM python:3.13-bookworm AS builder
RUN apt-get update && apt-get install --no-install-recommends -y \
build-essential libmariadb-dev && \
RUN apt-get update && apt-get install --no-install-recommends -y build-essential && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Download the latest installer, install it and then remove it
@@ -42,7 +41,6 @@ WORKDIR /app
COPY /src src
COPY --from=builder /app/.venv .venv
COPY --from=builder /usr/lib/x86_64-linux-gnu/libmariadb.so.3 /usr/lib/x86_64-linux-gnu
# Set up environment variables for production
ENV PATH="/app/.venv/bin:$PATH"
-1
View File
@@ -8,7 +8,6 @@ dependencies = [
"beautifulsoup4>=4.13.4",
"fastapi[standard]>=0.115.12",
"httpx==0.24.1",
"mariadb>=1.1.12",
"sqlalchemy>=2.0.40",
"platformdirs>=4.3.7",
"pathlib>=1.0.1",
+5 -15
View File
@@ -8,8 +8,7 @@ LOGGING_CONFIG: dict[str, Any] = {
"formatters": {
"default": {
"()": "uvicorn.logging.DefaultFormatter",
"fmt": "%(asctime)s - %(name)s - %(levelprefix)s %(message)s",
"use_colors": None,
"fmt": "%(asctime)s - %(name)s - %(levelprefix)s %(message)s"
},
"access": {
"()": "uvicorn.logging.AccessFormatter",
@@ -22,30 +21,21 @@ LOGGING_CONFIG: dict[str, Any] = {
},
},
"handlers": {
"file_handler": {
"formatter": "access_file",
"class": "logging.handlers.RotatingFileHandler",
"filename" : "./app.log",
"mode" : "a+",
"maxBytes" : 10*1024*1024,
"backupCount": 0,
},
"default": {
"formatter": "default",
"class": "logging.StreamHandler",
"stream": "ext://sys.stderr",
"stream": "ext://sys.stdout",
},
"access": {
"error": {
"formatter": "access",
"class": "logging.StreamHandler",
"stream": "ext://sys.stdout",
"stream": "ext://sys.stderr",
},
},
"loggers": {
"uvicorn": {"handlers": ["default"], "level": "INFO", "propagate": False},
"uvicorn.error": {"level": "INFO"},
"uvicorn.access": {"handlers": ["access", "file_handler"], "level": "INFO", "propagate": False},
"uvicorn.access": {"handlers": ["default"], "level": "INFO", "propagate": False},
},
}
+317 -332
View File
File diff suppressed because it is too large Load Diff