Add project files: Dockerfile, LICENSE, README, requirements
Some checks failed
CI / test (push) Has been cancelled

This commit is contained in:
2026-02-02 19:53:22 +00:00
parent db3be87180
commit 6465d1c82b

35
Dockerfile Normal file
View File

@@ -0,0 +1,35 @@
FROM python:3.11-slim-bookworm AS builder
WORKDIR /build
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/*
COPY pyproject.toml requirements.txt ./
RUN pip install --no-cache-dir --prefix=/install -r requirements.txt
FROM python:3.11-slim-bookworm AS runtime
WORKDIR /app
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1
COPY --from=builder /install /usr/local
COPY pyproject.toml ./
COPY src/ ./src/
RUN groupadd --gid=1000 appgroup && \
useradd --uid=1000 --gid=appgroup --shell /bin/bash --create-home appuser && \
chown -R appuser:appgroup /app
USER appuser
EXPOSE 8080
ENTRYPOINT ["python", "-m", "src"]
CMD ["serve"]