Add Dockerfile
This commit is contained in:
parent
c1fd2d4afc
commit
67a25f44c3
3 changed files with 35 additions and 0 deletions
1
.dockerignore
Symbolic link
1
.dockerignore
Symbolic link
|
@ -0,0 +1 @@
|
|||
.gitignore
|
29
Dockerfile
Normal file
29
Dockerfile
Normal 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
5
docker-compose.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
services:
|
||||
lwn-feed-proxy:
|
||||
build: .
|
||||
ports:
|
||||
- 8000:8000
|
Loading…
Reference in a new issue