Hi all,
We have a bunch of Streamlit apps deployed on Google AppEngine, but GAE doesnāt scale to zero instances which is big issue for the cost of low-traffic applications.
Cloud Run seems to be a cheaper alternative, but requires a bit more configuration to get Identity-Aware Proxy working - we have an External HTTPS Load Blancer with a Serverless cloud-run back-end in front of it, and use IAP for user auth.
Disabling authentication and accessing the Cloud Run instance directly works perfectly (so we know the container is healthy), but when I funnel traffic through the load balancer we get the White Screen of Death, a 404, and āYou must enable Javascript to run this app.ā
So: traffic is hitting the instance, but Streamlit is refusing to serve the Javascript.
My guess is that the proxied connection isnāt browser-based (the load balancer connects to your app, you never connect directly), so the Streamlit server doesnāt serve the JS, but Iām stuck on how to get around this. I need Streamlit to behave as it would if we were connecting directly.
This example project uses essentially the same TF configuration as I do: GitHub - tosh2230/streamlit-run: Streamlit apps on Cloud Run with Identity-Aware Proxy (IAP).
On this medium blog the author casually drops that he uses IAP but doesnāt go into detail:
A Practical Use-Case of Cloud-Native and Secured Dashboard with Google Cloud and Python Streamlit | by Ryo Koyajima / å°ē¢å³¶ č« | Medium
Has anyone else faced this issue and overcome it? Based on the two linked blogs, it seems like it should ājust workā. Iām not sure if thereās no discussion of this in the forum because no one has ever tried before, or because everyone has found this so easy and Iām missing something obvious.
Any advice would be appreciated!