1
Fork 0
lwn-feed-proxy/Dockerfile

30 lines
542 B
Text
Raw Permalink Normal View History

2024-10-22 22:13:41 +01:00
# syntax=docker/dockerfile:1.9
FROM python:3.13-slim
WORKDIR /app
RUN chown www-data /app
USER www-data
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
ENV UV_LINK_MODE=copy \
UV_COMPILE_BYTECODE=1 \
UV_PYTHON_DOWNLOADS=never \
UV_PYTHON=python3.13 \
PYTHONUNBUFFERED=1 \
PATH=/app/.venv/bin:$PATH
COPY pyproject.toml uv.lock ./
RUN uv sync \
--locked \
--no-dev \
--no-install-project \
--no-cache
COPY . /app
CMD ["granian", "--interface", "asgi", "--host", "0.0.0.0", "main:app"]