Closed Zahlii closed 5 years ago
TLS / SSL handling is a whole problem by itself, even though it sounds like something simple.
I suggest using a separate container to handle it, that is known as a TLS termination proxy, let me suggest Traefik. With it you can also automatize the generation of free HTTPS certificates with Let's encrypt, with auto-renewal included.
That's what I do in this other project: https://github.com/tiangolo/full-stack
I assume you were able to solve your problem, so I'll close this issue now.
But feel free to re-open it, add more comments or create new issues.
As a side note, you can set up a Docker Swarm mode cluster to handle HTTPS automatically for you in 20 minutes with DockerSwarm.rocks.
Now, if you are building an API, I recently created https://github.com/tiangolo/fastapi to facilitate all the needed parts, it would have about 800% the performance of Flask with this image, you would need to write half of the code (or less), etc.
It also has support for WebSockets automatically, as it an asynchronous framework (based on Starlette), which is what the StackOverflow link refers to.
Hi, would it be possible to enable SSL support for uwsgi? Without SSL support, trying to establish websocket connections will lead to the worker crashing down.
I guess the modification should be something like
to
Also related: https://stackoverflow.com/questions/24183053/how-to-build-uwsgi-with-ssl-support-to-use-the-websocket-handshake-api-function