-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (27 loc) · 851 Bytes
/
Dockerfile
File metadata and controls
47 lines (27 loc) · 851 Bytes
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
FROM python:3.11-slim AS build-backend
RUN apt-get update && apt-get install -y poppler-utils
WORKDIR /app
COPY ./pyproject.toml ./pyproject.toml
RUN pip install poetry==1.8.5
RUN set -e \
&& poetry config virtualenvs.create false \
&& poetry install --without dev
FROM node:20-slim AS build-frontend
WORKDIR /build
COPY ./package.json ./yarn.lock ./
RUN yarn
ENV NODE_ENV=production
COPY ./webapp ./webapp
COPY ./next.config.js .
COPY ./tailwind.config.js .
COPY ./postcss.config.js .
RUN yarn build
FROM build-backend
COPY ./server ./server
COPY ./images ./images
COPY --from=build-frontend /build/webapp/out ./static
# Ensures python output is sent straight to terminal without being first buffered
ENV PYTHONUNBUFFERED 1
# Set static dir to webapp
ENV STATIC_DIRECTORY /app/static
ENTRYPOINT ["python", "server/server.py"]