avoid poetry installing deps when we have them cached if they do not change

This commit is contained in:
burnettk 2023-02-01 07:53:35 -05:00
parent f58be8fe91
commit 48781039c7
1 changed files with 5 additions and 0 deletions

View File

@ -24,6 +24,11 @@ RUN useradd _gunicorn --no-create-home --user-group
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y -q gcc libssl-dev libpq-dev && apt-get install -y -q gcc libssl-dev libpq-dev
# poetry install takes a long time and can be cached if dependencies don't change,
# so that's why we tolerate running it twice.
COPY pyproject.toml poetry.lock /app/
RUN poetry install --without dev
COPY . /app COPY . /app
RUN poetry install --without dev RUN poetry install --without dev