-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
43 lines (26 loc) · 932 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
35
36
37
38
39
40
41
42
43
FROM docker.io/python:3.11 as build-backend
ENV PIP_NO_CACHE_DIR=1 \
PIP_ROOT_USER_ACTION=ignore \
POETRY_VIRTUALENVS_IN_PROJECT=true
RUN pip install -U pip setuptools wheel -q && \
pip install poetry==1.6.1 -q
WORKDIR /app/backend
COPY backend/pyproject.toml backend/poetry.lock ./
RUN poetry install --only main --no-root --sync --no-cache
COPY backend/app/ app/
FROM docker.io/node:18 as build-frontend
ENV npm_config_update_notifier=false
RUN corepack enable
WORKDIR /app/frontend
COPY frontend/package.json frontend/pnpm-lock.yaml ./
RUN pnpm fetch
COPY frontend/*.config.js frontend/index.html ./
COPY frontend/src src/
COPY frontend/public public/
RUN pnpm install
RUN pnpm build
FROM docker.io/nginx/unit:1.29.1-python3.11
WORKDIR /app
COPY --from=build-backend /app/backend backend
COPY --from=build-frontend /app/frontend/dist frontend
COPY docker/config.json /docker-entrypoint.d/config.json