From 52f8e78e78fdd56388283a61298b44804d83b2f9 Mon Sep 17 00:00:00 2001 From: Daniel Dolezal Date: Fri, 31 Oct 2025 13:44:50 +0100 Subject: [PATCH] update dockerfile to use uv for packages and to run the server --- Dockerfile | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index d7efc7b..7fb41bf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,15 @@ -FROM python:3.13-slim +FROM python:3.14-slim -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ - libssl-dev && \ - rm -rf /var/lib/apt/lists/* +COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ # Install app COPY . /app WORKDIR /app -VOLUME ["/app/uploads"] # Install dependencies -RUN pip install --upgrade pip && \ - pip install --root-user-action=ignore -r requirements.txt - -EXPOSE 8000 +RUN uv sync --locked --compile-bytecode # Starten Sie Ihre Anwendung -CMD ["hypercorn", "run:app", "--bind", "0.0.0.0:8000", "--workers", "1", "--websocket-ping-interval", "20", "--access-logfile", "-"] +EXPOSE 8000 + +CMD ["uv", "run", "hypercorn", "run:app", "--bind", "0.0.0.0:8000", "--workers", "1", "--websocket-ping-interval", "20", "--access-logfile", "-"]