diff --git a/Dockerfile b/Dockerfile index 4237dab..4df2c88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,9 +13,6 @@ RUN adduser -u 1000 --disabled-password --gecos "" appuser && chown -R appuser / # Install deps RUN apt update && apt full-upgrade -y -RUN apt install curl gcc g++ -y -RUN curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | bash -RUN apt install libmariadb3 libmariadb-dev -y # Install pip requirements COPY requirements.txt . diff --git a/requirements.txt b/requirements.txt index b6a95cf..a2a6e09 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ bcrypt cryptography -mariadb +pymysql python-dotenv pyTelegramBotAPI sqlmodel diff --git a/src/database/prepare.py b/src/database/prepare.py index 06f2272..ad487f8 100644 --- a/src/database/prepare.py +++ b/src/database/prepare.py @@ -5,9 +5,7 @@ from . import models def get_engine(host: str, user: str, passwd: str, db: str) -> Engine: - engine = sqlmodel.create_engine( - f"mariadb+mariadbconnector://{user}:{passwd}@{host}/{db}" - ) + engine = sqlmodel.create_engine(f"mariadb+pymysql://{user}:{passwd}@{host}/{db}") return engine