-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (24 loc) · 847 Bytes
/
Dockerfile
File metadata and controls
26 lines (24 loc) · 847 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
FROM node:bookworm-slim AS builder
COPY frontend /app
WORKDIR /app
RUN apt -y update && \
apt -y install ca-certificates && \
npm install && \
npx parcel build --public-url /static ./src/index.html --no-optimize
FROM python:3.13-slim-bookworm
RUN apt -y update && \
apt -y install curl ca-certificates ffmpeg && \
useradd -G users abc && \
mkdir -p /home/abc && \
chown abc:users /home/abc
USER abc
WORKDIR /home/abc
ADD --chown=abc:users https://astral.sh/uv/0.6.14/install.sh ./uv-installer.sh
RUN chmod +x /home/abc/uv-installer.sh && \
/home/abc/uv-installer.sh && \
rm /home/abc/uv-installer.sh
ENV PATH="/home/abc/.local/bin/:$PATH"
COPY main.py pyproject.toml uv.lock .
COPY --from=builder --chown=abc:users /app/dist ./frontend/dist
RUN uv sync --frozen
CMD ["uv", "run", "fastapi", "run", "main.py"]