-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (17 loc) · 780 Bytes
/
Dockerfile
File metadata and controls
23 lines (17 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM python:3.7-alpine
MAINTAINER Aleksei Zhukov <drdaeman@drdaeman.pp.ru>
ENV DATA_DIR=/srv
RUN mkdir -p /opt/firesync "${DATA_DIR}"
WORKDIR /opt/firesync
COPY requirements.txt /opt/firesync
RUN apk add --no-cache --virtual .build-deps python3-dev gcc musl-dev libffi-dev openssl-dev \
&& pip install -r requirements.txt && pip install gunicorn \
&& apk del .build-deps
# Hack: patch PyBrowserID (dirty, sorry about this)
COPY cio.py /usr/local/lib/python3.7/site-packages/browserid/crypto/cio.py
RUN sed -ie 's/browserid\.crypto\.m2/browserid.crypto.cio/' /usr/local/lib/python3.7/site-packages/browserid/crypto/__init__.py
COPY . /opt/firesync
RUN python manage.py collectstatic --noinput
VOLUME /srv
EXPOSE 8000
CMD ["gunicorn", "-b", "0.0.0.0:8000", "firesync.wsgi"]