diff --git a/Dockerfile.prod b/Dockerfile.prod index 0b0bccd..5d7f513 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -1,4 +1,4 @@ -FROM python:3.5 +FROM python:3.7-alpine ENV PYTHONUNBUFFERED 1 ENV IS_DOCKER 0 WORKDIR /app @@ -7,5 +7,16 @@ COPY requirements.production.txt ./ COPY . ./ COPY sikweb/settings-sample-prod.py 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 + 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"] + && gunicorn -w 4 -b 0.0.0.0:8000 sikweb.wsgi"] diff --git a/requirements.production.txt b/requirements.production.txt index aaa5468..cefca61 100644 --- a/requirements.production.txt +++ b/requirements.production.txt @@ -1,2 +1,2 @@ -uWSGI==2.0.14 +uWSGI==2.0.18 gunicorn==19.9.0