From 9b26cae26169c7a068d4c55b096246230f6b4682 Mon Sep 17 00:00:00 2001 From: Peter Baumgartner Date: Fri, 9 Feb 2024 16:57:04 -0700 Subject: [PATCH] Clean up requirements install --- Dockerfile | 11 ++++------- docker-compose.yml | 2 ++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 251e51f..4d71a5d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,15 +16,12 @@ RUN python -m venv --prompt . --upgrade-deps /app/.venv ENV LC_ALL=C.UTF-8 LANG=C.UTF-8 \ PATH=/app/.venv/bin:${PATH} -COPY requirements.txt ./ -COPY requirements ./requirements -RUN pip install -r requirements.txt -r requirements/dev.txt -COPY setup.cfg setup.py ./ -COPY {{ project_name }}/__init__.py ./{{ project_name }}/ -RUN pip install --no-deps -e . +ARG PY_REQUIREMENTS_FILE=requirements.txt +COPY requirements.txt requirements-dev.txt ./ +RUN pip install -r "$PY_REQUIREMENTS_FILE" COPY . ./ COPY --from=build-node /home/node/app/client/dist ./client/dist RUN SECRET_KEY=s python manage.py collectstatic --noinput -CMD /app/.venv/bin/manage.py runserver 0.0.0.0:8000 +CMD python manage.py runserver 0.0.0.0:8000 diff --git a/docker-compose.yml b/docker-compose.yml index aa061b8..0351b34 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,6 +32,8 @@ services: build: context: . target: build-python + args: + PY_REQUIREMENTS_FILE: requirements-dev.txt environment: - DEBUG=true - DATABASE_URL=postgres://postgres:postgres@db:5432/{{ project_name }}