Skip to content

Commit

Permalink
Ajustando erro Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoallmeida committed Sep 10, 2024
1 parent 6b28bbc commit 5a1bdb1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 2 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5a1bdb1

Please sign in to comment.