Use poetry for dependency management
This commit is contained in:
parent
cda2654573
commit
e495d7c188
21 changed files with 1252 additions and 75 deletions
15
Dockerfile
15
Dockerfile
|
|
@ -1,18 +1,11 @@
|
|||
FROM python:3.7-buster
|
||||
|
||||
# Run project binaries from the user's local bin folder
|
||||
ENV PATH=/home/newsreader/.local/bin:$PATH
|
||||
RUN pip install poetry
|
||||
|
||||
# Set the default shell
|
||||
RUN useradd -ms /bin/bash newsreader
|
||||
|
||||
RUN mkdir /app
|
||||
WORKDIR /app
|
||||
RUN chown newsreader:newsreader /app
|
||||
USER newsreader
|
||||
COPY poetry.lock pyproject.toml /app/
|
||||
|
||||
# Use a seperate layer for the project requirements
|
||||
COPY requirements /app/requirements
|
||||
RUN pip install --user -r requirements/dev.txt
|
||||
RUN poetry config virtualenvs.create false
|
||||
RUN poetry install --no-interaction
|
||||
|
||||
COPY . /app/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue