1
0
mirror of https://github.com/Damillora/Altessimo synced 2024-11-23 22:27:32 +00:00

More Dockerfile update

This commit is contained in:
Damillora 2021-07-10 01:36:21 +07:00
parent f02f7b826a
commit 4c618458c3
3 changed files with 6 additions and 2 deletions

View File

@ -3,13 +3,14 @@ FROM python:alpine
ADD requirements.txt /app/requirements.txt
RUN apk update \
&& apk add --virtual build-deps gcc python3-dev musl-dev \
&& apk add --no-cache mariadb-dev \
&& apk add --no-cache mariadb-dev jpeg-dev zlib-dev libpng-dev \
&& pip install --no-cache-dir -r /app/requirements.txt \
&& apk add --no-cache mariadb-connector-c \
&& apk del build-deps
ADD . /app
WORKDIR /app
RUN python manage.py collectstatic
EXPOSE 8000
ENV DJANGO_SETTINGS_MODULE=altessimo.production

View File

@ -46,6 +46,7 @@ INSTALLED_APPS = [
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',

View File

@ -1,3 +1,5 @@
Django>=3.0,<4.0
mysqlclient
gunicorn
whitenoise
Pillow