alan-turing-institute / CROP

CROP is a Research Observation Platform
MIT License
25 stars 4 forks source link

Consider using dedicated WSGI/http server rather than Flask development server #399

Closed nbarlowATI closed 1 year ago

nbarlowATI commented 1 year ago

Flask's documentation [https://flask.palletsprojects.com/en/2.2.x/deploying/] recommends that when deploying, one should use a dedicated WSGI server rather than the built-in development server. Additionally, running an HTTP server (such as nginx) in front of the WSGI server can be safer. One additional advantage of this may be that it becomes easier to serve compressed (gzip or brotli) content, so for example, the Unity WebGL build (which is currently uncompressed) could be made much much smaller. Perhaps try Gunicorn as WSGI server and nginx as HTTP server.