-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.app
More file actions
47 lines (32 loc) · 1.05 KB
/
Dockerfile.app
File metadata and controls
47 lines (32 loc) · 1.05 KB
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
47
# Build client
FROM node:25-alpine3.22 AS client-builder
WORKDIR /src
# install git to capture hash
RUN apk add --no-cache git
COPY .git .git
# Copy workspace root package files first
COPY package*.json ./
# Copy frontend workspace package files
COPY ./frontend/package*.json ./frontend/
RUN npm ci
# Copy the entire frontend directory
COPY ./frontend ./frontend/
# Build from the frontend workspace
WORKDIR /src/frontend
RUN npm run build
# Package production app
FROM python:3.14-slim
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
RUN apt-get update && \
apt-get upgrade -y
RUN pip install --upgrade pip --break-system-packages
WORKDIR /code
COPY ./packages/api/src/api /code/app
COPY ./packages/api/pyproject.toml /code/pyproject.toml
# Create a requirements.txt from the pyproject.toml
RUN uv pip compile /code/pyproject.toml -o /code/requirements.txt
RUN pip install -r requirements.txt
COPY --from=client-builder /src/frontend/dist /code/dist
EXPOSE 8080
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8080"]