Closed Midnighter closed 6 years ago
Okay, mostly we just need to change the uvicorn setup.py around a bit.
It’ll work with just ‘click’ and ‘h11’ installed. Anything else (httptools, uvloop, websockets, wsproto) is all optional.
Thanks for the reply. Since docker is the tool for me to run things in production, not having an optimized server would be a blocker for me. Luckily, I got it up and running using the Python slim Debian image. You can see the Dockerfile in this gist.
This image's size is ~ 210 MB (depending on your other dependencies) rather than the ~ 800 MB of the full Python 3.6 image.
I will try a bit more with Alpine Linux but I'm not super hopeful. I'll close this issue but will post back if I am successful.
Not sure what my problem was the other day. This Dockerfile shows how to build an image with Alpine Linux and it works just fine. Must have been tired or something.
I tried to create a docker image using Alpine Linux and deploying the app with gunicorn and uvicorn support. However, compilation of uvtools and httptools failed for me. I might raise issues there but they both seem like rather immature packages so maybe there are other alternatives?
Combinations I have tried for building the Alpine image:
I also tried with a Debian base but again uvloop and httptools do not provide wheels and need to be compiled.
So to bring this issue back to API Star, what are successful combinations of dependencies and ASGI to run API Star asynchronously? Does anyone have a sample Dockerfile? Thanks in advance.