FROM python:3.12-slim
RUN pip install --no-cache-dir requests
WORKDIR /app
COPY app.py .
HEALTHCHECK --interval=20s --timeout=5s \
    CMD python3 -c "import urllib.request; urllib.request.urlopen('http://localhost:8091/health')" || exit 1
CMD ["python3", "app.py"]
