Skip to content

Commit

Permalink
Merge branch 'pip-fixes'
Browse files Browse the repository at this point in the history
  • Loading branch information
ipmb committed Feb 10, 2024
2 parents aef2a20 + 9b26cae commit eb68e27
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit eb68e27

Please sign in to comment.