Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting running FastAPI apps via Uvicorn in Python runtimes #2254

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

cormacpayne
Copy link
Contributor

This PR adds support for detecting and running applications targeting the FastAPI Python framework. Rather than using the traditional Gunicorn server for running the application, we are now supporting Uvicorn as the server of choice for FastAPI applications.

  • The purpose of this PR is explained in this message or in an issue. If an issue please include a reference as #<issue_number>.
  • Tests are included and/or updated for code changes.
  • Proper license headers are included in each file.

@cormacpayne cormacpayne requested a review from a team as a code owner November 13, 2023 21:17
@@ -81,6 +81,7 @@ LABEL io.buildpacks.stack.id="oryx.stacks.skeleton"
RUN ${IMAGES_DIR}/runtime/python/install-dependencies.sh
RUN pip install --upgrade pip \
&& pip install gunicorn \
&& pip install uvicorn \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, I don't think we can add these for the existing images as it can have some implications in terms of size and side-effects for existing customers.
The easiest ways I would see is:

  • Waiting for a new Python version and only enable this here.
  • Create a new image just for this case, which is a bit annoying as well.
    We can sync offline if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants