FROM python:3.12-slim
RUN pip install --no-cache-dir flask==3.1.* requests==2.* gunicorn==23.*
WORKDIR /app
COPY hub.py .
ENV PYTHONUNBUFFERED=1
VOLUME ["/data"]
EXPOSE 8097
# one worker (so the web-app updater runs once), several threads for concurrent requests
CMD ["gunicorn", "--workers", "1", "--threads", "8", "--bind", "0.0.0.0:8097", "--access-logfile", "-", "hub:app"]
