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 && \
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", "-"]