1
Fork 0

Add Dockerfile

This commit is contained in:
Jake Howard 2024-10-22 22:13:41 +01:00
parent c1fd2d4afc
commit 67a25f44c3
Signed by: jake
GPG key ID: 57AFB45680EDD477
3 changed files with 35 additions and 0 deletions

1
.dockerignore Symbolic link
View file

@ -0,0 +1 @@
.gitignore

29
Dockerfile Normal file
View file

@ -0,0 +1,29 @@
# 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"]

5
docker-compose.yml Normal file
View file

@ -0,0 +1,5 @@
services:
lwn-feed-proxy:
build: .
ports:
- 8000:8000