uWSGI +nginx setup - Dash (Plotly) Deployment
So i've set up nginx as so...
server { server_name 0.0.0.0; listen 80; root /home/ubuntu/school_dashboard; client_max_body_size 200M; include /etc/nginx/default.d/*.conf;location /dependencies { proxy_read_timeout 300; proxy_connect_timeout 300; proxy_pass http://0.0.0.0:5005; #index wsgi.py include uwsgi_params; uwsgi_pass unix:/home/ubuntu/school_dashboard/dependencies/urlgen.sock; }}
and my uwsgi file as....
[uwsgi]module = dash_clean:servermaster = trueprocesses = 5socket = dashboard.sockchmod-socket = 660vacuum = truedie-on-term = true
I just had to change the module parameter
The module parameter should be
module = dash:server
This is because the module is actually the name of your python file that instantiates the flask application instance. In this case it's in your dash.py. Although, in your subsequent comments you seem to reference dash_clean.py, in that case it should be:
module = dash_clean:server
The part after the module name is the name of the "callable", or the name of the variable that is the flask application.
You define it in your code example as:
server = flask.Flask(__name__)
Alternatively, you could define them seperately in the ini
module = dashcallable = server