FROM python:3.12 AS build WORKDIR /app COPY requirements.txt . RUN pip wheel --no-cache-dir --wheel-dir /wheels -r requirements.txt gunicorn==23.0.0 FROM python:3.12-slim WORKDIR /app COPY --from=build /wheels /wheels RUN pip install --no-cache-dir --no-index --find-links=/wheels /wheels/*.whl && rm -rf /wheels COPY . . EXPOSE 7799 # 2 workers is plenty: chart computation is a few ms; timezonefinder/geonames load per worker CMD ["gunicorn", "-w", "2", "-b", "0.0.0.0:7799", "--access-logfile", "-", "app:app"]