update dockerfile to use uv for packages and to run the server
Build and Push Docker Container / build-and-push (push) Successful in 1m27s

This commit is contained in:
2025-10-31 13:44:50 +01:00
parent b93969a6c4
commit 52f8e78e78
+6 -11
View File
@@ -1,20 +1,15 @@
FROM python:3.13-slim FROM python:3.14-slim
RUN apt-get update && \ COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
apt-get install -y --no-install-recommends \
libssl-dev && \
rm -rf /var/lib/apt/lists/*
# Install app # Install app
COPY . /app COPY . /app
WORKDIR /app WORKDIR /app
VOLUME ["/app/uploads"]
# Install dependencies # Install dependencies
RUN pip install --upgrade pip && \ RUN uv sync --locked --compile-bytecode
pip install --root-user-action=ignore -r requirements.txt
EXPOSE 8000
# Starten Sie Ihre Anwendung # 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", "-"]