NGINX + GUNICORN + FlaskWebsocket setup

21 Views Asked by At

Everything works properly with flask development server but when I try to do it in a docker container it stops working.

I'm trying to set up a GUNICORN app which has Graphene (GraphQL) and Websocket as well.

I didn't get there to set up the NGINX part as the GUNICORN setup doesn't function by directly connecting to the socket endpoint from angular. It doesn't work with single workers either.

My use case is the following:

  • having graphql endpoint for asking an LLM
  • the LLM streams the answer but I want to send the progress out through Websocket

I tried to use uWSGI that doesn't work either. Any help would be appreciated.

0

There are 0 best solutions below