tiangolo / meinheld-gunicorn-docker

Docker image with Meinheld managed by Gunicorn for high-performance WSGI (Flask, Django, etc) web applications in Python with performance auto-tuning.
MIT License
165 stars 59 forks source link

Pypy versions #28

Closed luckydonald closed 3 weeks ago

luckydonald commented 3 years ago

So, for a web server, having a just in time compiled more efficient code sounds like a nice feature.

So versions based on PyPy versions (currently up to pypy:3.7) could be useful.

Thoughts?

luckydonald commented 2 years ago

It can be solved like that

# Credit: @luckydonald, see https://github.com/tiangolo/meinheld-gunicorn-docker/issues/28#issuecomment-1115213497

ARG PYPY_PYTHON_VERSION=3.9

FROM tiangolo/meinheld-gunicorn:python${PYPY_PYTHON_VERSION} AS origin

FROM pypy:${PYPY_PYTHON_VERSION}

COPY --from=origin /entrypoint.sh /entrypoint.sh
COPY --from=origin /start.sh /start.sh
COPY --from=origin /gunicorn_conf.py /gunicorn_conf.py
COPY --from=origin /app /app