Good afternoon,
I am having issues displaying my dash app to azure web applications. I have the code deployed but when I click on the link it says the app is up and running but there is no code…Even though I have code. Here is the website
Is there something I am missing?
Here is my dash_app code:
""" Import Dash modules"""
from dash import Dash
from Callbacks import add_callbacks
from Layout import dash_layout
external_stylesheets = ["https://codepen.io/chriddyp/pen/bWLwgP.css"]
dash_app: Dash = Dash(__name__, external_stylesheets=external_stylesheets)
app = dash_app.server
add_callbacks(dash_app)
dash_app.layout = dash_layout
if __name__ == "__main__":
dash_app.run_server(debug=True)
callbacks and layout are in different modules. its a lot of code so it all cannot be in this file. Also this runs perfectly on my local machine.
It’s difficult to say, but I suspect you aren’t forwarding ports properly. When you run dash_app.run_server(debug=True), the development server is run on port 8050 on the server. To remedy this, you could try setting in-bound rules for traffic such that in-bound traffic from port 80 (or 443 for HTTPS), is redirected to port 8050. Another option is to directly set the port argument in run_server. In any care, both of these suggestions are not best practice.
If you actually intend to use the application for production, I would use a production server like gunicorn on your Azure server, and avoid using run_server at all.
Ah, yup can’t tell you the amount of times i’ve gone down the same path wondering why my app isn’t working only to find i didn’t open the security group ports. Good find!
Well I just noticed I am having some issues with the application. I think maybe it has to to with using a development port instead of production. the dropdown for ADF files is not populating when a file is uploaded…What do you think I can do to fix this? what port is used for a production environment?