diff --git a/Dockerfile b/Dockerfile index 59e5101..1ebcb88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,16 +20,13 @@ RUN --mount=type=cache,target=/root/.cache \ ENV LC_ALL=C.UTF-8 LANG=C.UTF-8 \ PATH=/app/.venv/bin:${PATH} -COPY requirements.txt ./ -COPY requirements ./requirements +ARG PY_REQUIREMENTS_FILE=requirements.txt +COPY requirements.txt requirements-dev.txt ./ RUN --mount=type=cache,target=/root/.cache \ - pip install --disable-pip-version-check --root-user-action=ignore --no-cache-dir -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 . + pip install --disable-pip-version-check --root-user-action=ignore --no-cache-dir -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 }}