build mysql dependencies in Dockerfile

This commit is contained in:
Lexi / Zoe 2019-10-19 02:55:47 +02:00
parent b76a488537
commit 2b698d2921
Signed by: binaryDiv
GPG Key ID: F8D4956E224DA232
1 changed files with 8 additions and 2 deletions

View File

@ -11,6 +11,12 @@ COPY requirements.txt .
RUN pip3 install --upgrade pip && \ RUN pip3 install --upgrade pip && \
pip3 install --no-cache-dir -r requirements.txt pip3 install --no-cache-dir -r requirements.txt
# For production: build mysql dependencies
RUN apk add --virtual build-deps gcc python3-dev musl-dev && \
apk add --no-cache mariadb-dev && \
pip3 install --no-cache-dir mysqlclient && \
apk del build-deps
COPY . . COPY . .
# TODO #1: build a real production setup with gunicorn, nginx for static files etc. # TODO #1: build a real production setup with gunicorn, nginx for static files etc.