1
Fork 0
lwn-feed-proxy/Dockerfile
2024-10-22 22:13:41 +01:00

29 lines
542 B
Docker

# 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"]