19 lines
597 B
Docker
19 lines
597 B
Docker
FROM python:alpine
|
|
ENV PYTHONUNBUFFERED 1
|
|
ENV IS_DOCKER 0
|
|
WORKDIR /app
|
|
COPY requirements.txt ./
|
|
COPY requirements.production.txt ./
|
|
|
|
RUN apk add --no-cache --virtual .build-deps build-base linux-headers \
|
|
&& apk add --no-cache jpeg-dev zlib-dev postgresql-dev \
|
|
&& pip install -r requirements.txt \
|
|
&& pip install -r requirements.production.txt \
|
|
&& apk del .build-deps
|
|
|
|
COPY . ./
|
|
COPY sikweb/settings-sample-prod.py settings.py
|
|
|
|
ENTRYPOINT ["sh", "-c", "echo 'Django running on http://localhost:8000 in production mode' \
|
|
&& gunicorn -w 4 -b 0.0.0.0:8000 web20-backend.wsgi"]
|