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 cd435841d7
commit 7da3cb0377
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 \
&& 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
RUN poetry install --without dev