Files
2026-05-09 18:41:03 +02:00

24 lines
707 B
Docker

FROM python:3.12-slim-bookworm
# unrar-free covers RAR4; for RAR5 archives replace with the non-free unrar:
# RUN echo "deb http://deb.debian.org/debian bookworm non-free" >> /etc/apt/sources.list \
# && apt-get update && apt-get install -y --no-install-recommends unrar
RUN apt-get update \
&& apt-get install -y --no-install-recommends unrar-free \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# SQLite database and any persistent state live here; mount a volume in production
ENV DATA_DIR=/app/data
RUN mkdir -p /app/data
EXPOSE 8000
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]