FROM python:3.12-slim

WORKDIR /app

# tzdata: python:3.12-slim doesn't include it by default, so a TZ
# environment variable (see docker-compose.yml.example -- used by the
# "Quiet hours" setting) would silently fail to resolve and fall back to
# UTC without this.
RUN apt-get update && apt-get install -y --no-install-recommends tzdata \
    && rm -rf /var/lib/apt/lists/*

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY app ./app

EXPOSE 8420

CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8420"]
