Flask, Iris Container and NGINX?
I have a flask application, its working locally. I also have a iris for health 2024.3 docker container front-ended with the iris nginx container.
I can configure the WSGI application with iris for health, give it a "url" (/flask or /csp/flask) but I cannot access the flask application. It looks like the url is not found within the nginx configuration. Is there any documentation or suggestion for configuration/enabling a flask app with a IRIS container front ended with the nginx container (provided by intersystems container registry)
So here is answer is anybody is interested and running Iris for Health in a container and front ended by the nginx webgateway container.
First - What ever url name you use in the web application configuration you will need to add to the nginx config file. See below
Next - when access the url be sure to add the trailing slash (/) otherwise you will get a "url not found on this server message. I'm not sure why this happens as both URLs *should* work?
Hope this helps.
Example:
.png)
URL Name: /csp/flask
You will need to add it to the CSP.conf file for the nginx config like the following
location /csp/flask { CSP ON; CSPNSD_pass 127.0.0.1:7038; CSPNSD_response_headers_maxsize 8k; CSPNSD_connect_timeout 300s; CSPNSD_send_timeout 300s; CSPNSD_read_timeout 300s; }