Files
web2.0-backend/Dockerfile.prod
T
2019-11-03 16:55:36 +02:00

21 lines
559 B
Docker

FROM python:3.7-alpine
ENV PYTHONUNBUFFERED 1
WORKDIR /app
COPY requirements.txt ./
COPY requirements.production.txt ./
COPY . ./
# uWSGI, gunicorn etc.
RUN apk add --no-cache python3-dev build-base linux-headers pcre-dev openssl \
# PSQL
&& apk add --no-cache postgresql-dev \
# Pillow
&& apk add --no-cache jpeg-dev zlib-dev \
&& pip install --upgrade pip \
&& pip install -r requirements.txt \
&& pip install -r requirements.production.txt
RUN python manage.py collectstatic --noinput
ENTRYPOINT ["sh", "-c", "./production_entrypoint.sh"]