Migrate to Poetry and upgrade Django

This commit is contained in:
Jonathan Cremin 2019-07-09 20:27:48 +00:00
parent a18e114223
commit 238d6c4ef9
5 changed files with 98 additions and 118 deletions

View file

@ -1,4 +1,4 @@
FROM python:3.7.0-alpine3.8
FROM python:3.7.4-alpine3.10
WORKDIR /app
@ -7,15 +7,16 @@ EXPOSE 8000
ENV DEBUG false
ENV SECRET_KEY unsafe
RUN pip install pipenv && \
RUN pip install poetry && \
apk add postgresql-dev gcc python3-dev musl-dev
ADD Pipfile* ./
ADD pyproject.toml ./
ADD poetry.lock ./
RUN pipenv install
RUN poetry install
ADD . .
RUN pipenv run ./manage.py collectstatic --noinput
RUN poetry run ./manage.py collectstatic --noinput
CMD ["pipenv", "run", "gunicorn", "-b", "0.0.0.0:8000", "app.wsgi", "--log-file", "-"]
CMD ["poetry", "run", "gunicorn", "-b", "0.0.0.0:8000", "app.wsgi", "--log-file", "-"]