FROM python:3.12-slim

LABEL org.opencontainers.image.title="🍱 Lunch Notifier"
LABEL org.opencontainers.image.description="Kyrene de la Mariposa lunch menu → Home Assistant calendar"
LABEL org.opencontainers.image.url="http://localhost:2323"
LABEL org.opencontainers.image.icon="https://resources.finalsite.net/images/f_auto,q_auto/v1708515016/kyreneorg/caewi1dctc6afx1d8nq1/Logo_Mariposa-Mascot.png"
LABEL net.unraid.docker.icon="http://192.168.86.33:2323/icon.png"

WORKDIR /app

# tzdata provides /usr/share/zoneinfo, which the host's bind-mounted
# /etc/localtime (docker-compose.yml) is typically a symlink into — without
# it present in the image, the symlink dangles and the container silently
# falls back to UTC.
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 scraper.py app.py ./

# Settings persist here (mount as a volume)
VOLUME ["/data"]

CMD ["python", "app.py"]
