Fix for player timer.
[wolnelektury.git] / Dockerfile
1 FROM python:3.9-trixie AS base
2
3 ARG UID=1000
4 ARG GID=1000
5
6 RUN     apt-get update && apt-get install -y \
7         git \
8         calibre \
9         texlive-xetex texlive-lang-polish \
10         texlive-extra-utils \
11         texlive-lang-greek \
12         texlive-lang-other \
13         texlive-luatex \
14         texlive-fonts-extra \
15         texlive-fonts-extra-links \
16         fonts-noto-core fonts-noto-extra
17
18
19 COPY requirements/requirements.txt requirements.txt
20
21 RUN pip install --no-cache-dir -r requirements.txt
22 RUN pip install --no-cache-dir \
23     psycopg2-binary \
24     django-debug-toolbar==3.2.2
25
26 RUN addgroup --gid $GID app && \
27     adduser --gid $GID --home /app --uid $UID app
28
29
30 # fonts
31 RUN cp -a /usr/local/lib/python*/site-packages/librarian/fonts /usr/share/fonts
32 RUN fc-cache
33
34 USER app
35
36 WORKDIR /app/src
37
38 RUN mkdir /app/.ipython
39
40 FROM base AS dev
41
42 #RUN pip install --no-cache-dir coverage
43
44
45 FROM base AS prod
46
47 RUN pip install --no-cache-dir gunicorn
48
49 COPY src /app/src