2019-09-24 02:02:51 +02:00
|
|
|
FROM alpine:3.7
|
|
|
|
|
|
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
|
|
|
|
RUN apk add --no-cache \
|
2019-10-19 02:55:47 +02:00
|
|
|
python3 \
|
|
|
|
|
py3-gunicorn
|
2019-09-24 02:02:51 +02:00
|
|
|
|
|
|
|
|
COPY requirements.txt .
|
|
|
|
|
RUN pip3 install --upgrade pip && \
|
|
|
|
|
pip3 install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
2019-10-19 02:55:47 +02:00
|
|
|
# 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
|
|
|
|
|
|
2019-09-24 02:02:51 +02:00
|
|
|
COPY . .
|
|
|
|
|
|
2019-10-21 01:19:02 +02:00
|
|
|
EXPOSE 8000
|
2019-10-19 01:48:41 +02:00
|
|
|
|
2019-10-21 01:19:02 +02:00
|
|
|
CMD ["gunicorn", "pluralityspace.wsgi:application", \
|
|
|
|
|
"--bind", "0.0.0.0:8000"]
|