Add new Dockerfile for prod
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
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"]
|
||||
Reference in New Issue
Block a user