-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
71 lines (58 loc) · 1.25 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
FROM python:3.8.0-alpine
WORKDIR /journal-of-digital-history-backend
ARG GIT_TAG
ARG GIT_BRANCH
ARG GIT_REVISION
RUN pip install pip==23.1.2
RUN apk add --no-cache \
postgresql-libs \
libxml2 \
libxslt \
# Pillow dependencies
freetype-dev \
fribidi-dev \
harfbuzz-dev \
jpeg-dev \
lcms2-dev \
openjpeg-dev \
tcl-dev \
tiff-dev \
tk-dev \
zlib-dev \
pango-dev
RUN apk add --no-cache --virtual .build-deps \
gcc \
musl-dev \
postgresql-dev \
jpeg-dev \
zlib-dev \
freetype-dev \
lcms2-dev \
openjpeg-dev \
tiff-dev \
tk-dev \
tcl-dev \
harfbuzz-dev \
fribidi-dev \
libxslt-dev
# Additional font
RUN apk --update --upgrade --no-cache add fontconfig ttf-freefont font-noto terminus-font \
&& fc-cache -f \
&& fc-list | sort
COPY jdh ./jdh
COPY jdhapi ./jdhapi
COPY jdhseo ./jdhseo
COPY jdhtasks ./jdhtasks
COPY dashboard ./dashboard
COPY schema ./schema
COPY dbconnection.py .
COPY manage.py .
COPY requirements.txt .
RUN pip install -r requirements.txt
RUN apk del --no-cache .build-deps
RUN mkdir -p logs
RUN mkdir -p outputs
ENV GIT_TAG=${GIT_TAG}
ENV GIT_BRANCH=${GIT_BRANCH}
ENV GIT_REVISION=${GIT_REVISION}
ENTRYPOINT python ./manage.py runserver