Imageomics / dashboard-prototype

Prototype data dashboard for Imageomics Data
http://dash.imageomics.org
MIT License
5 stars 2 forks source link

Remove debug setting for production deployment #42

Closed johnbradley closed 1 year ago

johnbradley commented 1 year ago

Right now we are running production with debug enabled: https://github.com/Imageomics/dashboard-prototype/blob/09c8cd3f8c412a8eb97d3ec61dbb8b41634d0418/dashboard.py#L336 This could potentially contribute to performance issues. The run_server function is a deprecated alias of run. Here is the docs for run: https://dash.plotly.com/reference#app.run The debug flag is passed to Flask.debug setting. Here is some documentation from Flask on issues with production/debug https://flask.palletsprojects.com/en/2.3.x/debugging/

egrace479 commented 1 year ago

So, we should switch to app.run? It seems that's still not advisable for production:

WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.

--is this something we should consider?

egrace479 commented 1 year ago

So, we should switch to app.run? It seems that's still not advisable for production:

WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.

--is this something we should consider?

There are multiple options for deployment method. With the HF Spaces implementation, we use gunicorn with a Dockerfile, and this seems to perform well.