diff --git a/.gitignore b/.gitignore index c889d0a..e1756e2 100644 --- a/.gitignore +++ b/.gitignore @@ -100,7 +100,7 @@ ipython_config.py # This is especially recommended for binary packages to ensure reproducibility, and is more # commonly ignored for libraries. # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control -#poetry.lock +poetry.lock # pdm # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. diff --git a/Dockerfile b/Dockerfile index 4794d18..f5b2a3d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,5 @@ FROM python:3.10.12-slim -# Configure Poetry -ENV POETRY_HOME=/opt/poetry -ENV POETRY_VENV=/opt/poetry-venv -ENV POETRY_CACHE_DIR=/opt/.cache -ENV PATH="${PATH}:${POETRY_VENV}/bin" - RUN apt-get update RUN apt-get install -y --no-install-recommends \ libatlas-base-dev \ @@ -18,8 +12,8 @@ WORKDIR /app COPY /app /app COPY pyproject.toml . -RUN pip install --upgrade pip setuptools wheel && pip install poetry -RUN poetry install +RUN pip install --upgrade pip setuptools wheel && pip install --no-cache-dir poetry +RUN poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi EXPOSE 5000 diff --git a/app/main.py b/app/main.py index 5541994..1616abd 100644 --- a/app/main.py +++ b/app/main.py @@ -7,10 +7,10 @@ @app.route('/', methods=['GET','POST']) def calc(): """ - Coleta os dados de entradas: - * Codigo do fundo - * Quantidade de cotas - * Valor a investir + Coleta os dados de entradas: + * Codigo do fundo + * Quantidade de cotas + * Valor a investir """ if request.method == "POST": # Collect all the dynamically generated fields