FROM python:3.11-slim

WORKDIR /app

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

COPY . .

# 配置文件不打包，由 volumes 挂载
VOLUME ["/app/config.yaml", "/app/last_notifications.json"]

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