Files
web2.0-backend/Dockerfile.prod
T
2019-10-08 00:29:20 +03:00

27 lines
747 B
Docker

FROM python:3.7-alpine
ENV PYTHONUNBUFFERED 1
ENV IS_DOCKER 0
WORKDIR /app
COPY requirements.txt ./
COPY requirements.production.txt ./
COPY . ./
COPY sikweb/settings-sample-prod.py sikweb/settings.py
# uWSGI, gunicorn etc.
RUN apk add --no-cache --virtual .build-deps 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 \
&& apk del .build-deps
RUN python manage.py collectstatic --noinput
# run migrate
# python manage.py migrate --noinput
ENTRYPOINT ["sh", "-c", "./production_entrypoint.sh"]