-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
45 lines (34 loc) · 1.19 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM python:3.9.5
RUN apt-get update && apt-get install -y \
git \
libcap-dev \
libjansson-dev \
libpcre3-dev \
librsvg2-bin \
libsasl2-dev \
libyaml-dev \
optipng \
uuid-dev
WORKDIR /usr/src/uwsgi
# prepare uwsgi
RUN wget -O uwsgi-2.0.15.tar.gz https://github.com/unbit/uwsgi/archive/2.0.15.tar.gz && \
tar --strip-components=1 -axvf uwsgi-2.0.15.tar.gz
COPY uwsgi_profile.ini buildconf/donormotor.ini
# build and install uwsgi
RUN python uwsgiconfig.py --build donormotor && cp uwsgi /usr/local/bin/ && \
mkdir -p /usr/local/lib/uwsgi/plugins
WORKDIR /usr/src/app
# install python dependencies
COPY requirements.txt /usr/src/app/
RUN pip install --no-cache-dir -r requirements.txt
# copy application
ADD migrations /usr/src/app/migrations
ADD donormotor /usr/src/app/donormotor
COPY LICENSE README.md uwsgi_docker.ini setup.py /usr/src/app/
VOLUME ["/data/config", "/data/media", "/data/ssl"]
EXPOSE 8443
ENV PYTHONPATH /usr/src/app
ENV FLASK_APP donormotor
ENV APP_CONFIG_PATH /data/config/config.json
RUN python setup.py render_svgs
CMD ["uwsgi", "--ini", "uwsgi_docker.ini"]