You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our usual recommendation for deployment is gunicorn as the production server, and you set up a Procfile or similar with:
gunicorn app:server --workers 4
But wait... what's server? Well, you need to add another line to your app.py (that's the module app referred to before the colon):
app=Dash()
...
server=app.server
Ugh, a code change! Ripe for problems. Instead we could add a method to Dash, e.g. wsgi_app which returns the flask app, and this way the Procfile can be written as:
gvwilson
changed the title
[Feature Request] Remove server=app.server requirement for Gunicorn
Remove server=app.server requirement for Gunicorn
Jan 23, 2025
Our usual recommendation for deployment is
gunicorn
as the production server, and you set up aProcfile
or similar with:gunicorn app:server --workers 4
But wait... what's
server
? Well, you need to add another line to yourapp.py
(that's the moduleapp
referred to before the colon):Ugh, a code change! Ripe for problems. Instead we could add a method to Dash, e.g.
wsgi_app
which returns the flask app, and this way theProcfile
can be written as:gunicorn app:app --workers 4
And the
app
object already in your Dash app is picked up. Simpler, one fewer code change. nice. Vizro does this: https://vizro.readthedocs.io/en/stable/pages/user-guides/run/#jupyter .The text was updated successfully, but these errors were encountered: