Use poetry for dependency management

This commit is contained in:
Sonny 2020-04-13 17:05:46 +02:00
parent cda2654573
commit e495d7c188
21 changed files with 1252 additions and 75 deletions

View file

@ -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/