Skip to content

Commit

Permalink
Clean up requirements install
Browse files Browse the repository at this point in the history
  • Loading branch information
ipmb committed Feb 9, 2024
1 parent 5750f4b commit 9b26cae
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 @@ -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
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 9b26cae

Please sign in to comment.