Users in docker
[wolnelektury.git] / Dockerfile
1 FROM python:3.8 AS base
2
3 RUN     apt-get update && apt-get install -y \
4         git \
5         calibre \
6         texlive-xetex texlive-lang-polish \
7         libespeak-dev
8
9 COPY requirements/requirements.txt requirements.txt
10
11 # numpy -> aeneas
12 RUN pip install numpy
13 RUN pip install aeneas
14
15 RUN pip install --no-cache-dir -r requirements.txt
16 RUN pip install --no-cache-dir \
17     psycopg2-binary \
18     django-debug-toolbar==3.2.2 \
19     python-bidi
20
21 RUN     apt-get install -y \
22         texlive-extra-utils \
23         texlive-lang-greek \
24         texlive-lang-other \
25         texlive-luatex \
26         texlive-fonts-extra \
27         texlive-fonts-extra-links \
28         fonts-noto-core fonts-noto-extra
29
30
31 # fonts
32 RUN cp -a /usr/local/lib/python*/site-packages/librarian/fonts /usr/local/share/fonts
33 RUN fc-cache
34
35 WORKDIR /app/src
36
37
38 FROM base AS dev
39
40 #RUN pip install --no-cache-dir coverage
41
42
43 FROM base AS prod
44
45 RUN pip install --no-cache-dir gunicorn
46
47 COPY src /app/src