forked from okfde/django-filingcabinet
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (24 loc) · 846 Bytes
/
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
FROM node:20-alpine as jsbuilder
WORKDIR /usr/src/js
COPY package.json pnpm-lock.yaml /usr/src/js/
RUN corepack enable
RUN pnpm install
COPY frontend /usr/src/js/frontend
COPY vite.config.js .
RUN pnpm build
# ---
FROM python:3.10
ENV PYTHONUNBUFFERED 1
ENV DJANGO_SETTINGS_MODULE fc_project.settings
RUN apt-get update && apt-get install -y --no-install-recommends imagemagick tesseract-ocr tesseract-ocr-eng tesseract-ocr-deu tesseract-ocr-nld tesseract-ocr-osd poppler-utils qpdf
WORKDIR /project
RUN useradd -m -r appuser && chown appuser /project
COPY requirements-production.txt .
RUN pip install -r requirements-production.txt
# copy the whole project except what is in .dockerignore
COPY src .
COPY manage.py .
COPY --from=jsbuilder /usr/src/js/build /project/build
USER appuser
EXPOSE 8000
RUN python ./manage.py collectstatic