nategodd/Dockerfile
type-two 11edf66af6 Multi-stage Dockerfile (pyswisseph needs gcc), deploy notes
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-15 10:44:36 +10:00

14 lines
515 B
Docker

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"]