From 87f359b9355d1a9fcc640ac7d63a7ca517b1c941 Mon Sep 17 00:00:00 2001 From: Deko Date: Sat, 30 Dec 2023 18:13:13 +0100 Subject: [PATCH] Change entrypoint, add dotenv for local debug --- Dockerfile | 2 +- poetry.lock | 17 ++++++++++++++++- pyproject.toml | 1 + 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 12cdbcc..d62f2fd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,4 +15,4 @@ RUN curl -sSL https://install.python-poetry.org | python3 - ENV PATH=/root/.local/bin:$PATH RUN poetry install -ENTRYPOINT ["poetry", "run", "python", "main.py"] +ENTRYPOINT ["poetry", "run", "python", "-m", "app.main"] diff --git a/poetry.lock b/poetry.lock index 65914ee..451feed 100644 --- a/poetry.lock +++ b/poetry.lock @@ -558,6 +558,21 @@ pytest = ">=4.6" [package.extras] testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtualenv"] +[[package]] +name = "python-dotenv" +version = "1.0.0" +description = "Read key-value pairs from a .env file and set them as environment variables" +category = "main" +optional = false +python-versions = ">=3.8" +files = [ + {file = "python-dotenv-1.0.0.tar.gz", hash = "sha256:a8df96034aae6d2d50a4ebe8216326c61c3eb64836776504fcca410e5937a3ba"}, + {file = "python_dotenv-1.0.0-py3-none-any.whl", hash = "sha256:f5971a9226b701070a4bf2c38c89e5a3f0d64de8debda981d1db98583009122a"}, +] + +[package.extras] +cli = ["click (>=5.0)"] + [[package]] name = "pyyaml" version = "6.0.1" @@ -745,4 +760,4 @@ dev = ["black (>=19.3b0)", "pytest (>=4.6.2)"] [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "d03129f97abdd02a458bd40fafe92eb05ab42a627c11085ca2c0eae9103a07ef" +content-hash = "cb8576503785736cbdb6173bb0353e1ef3ff0d33e04aa2b37632a9517a068233" diff --git a/pyproject.toml b/pyproject.toml index 934d867..8212d1e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,6 +9,7 @@ python = "^3.11" requests = "^2.31.0" loguru = "^0.7.2" pre-commit = "^3.6.0" +python-dotenv = "^1.0.0" [tool.poetry.dev-dependencies] black = "^23.12.1"