Would you:
A: serve the files with nginx, containerize the application static files, throw into artifact registry and then a Cloud Run Service
B: export the static files to GCS, create a thin nginx Cloud Run Service, mount the bucket as a volume and serve that way
I feel like im over-engineering by using A, because its what I usually do for my backend services, but I haven't deployed a static site before so I'm keen to see if there's any benefits to B.
The site is currently served via firebase hosting, but I'm now required to put IAP in front of it
Cheers!
Edit:
To give a bit more detail on my current set up:
- I have an ALB already, it acts as a front door for 2 public api's (cloud run) and 1 bucket for serving video's. None of these 3 require IAP
- This new static site is an admin dashboard, and is needs IAP in front of it.
To everyone saying I don't need Cloud Run, could you confirm if I am able to achieve the following:
User -> IAP -> ALB -> Static Site Files (GCS)
While keeping the other ALB paths public?
Edit 2:
I hate to be a meat proxy but I've caved and asked AI and it's adamant that I must use Cloud Run.
To those suggesting a LB and GCS Bucket only, can you argue the following?
That claim is wrong for GCS. The IAP load-balancer doc states it explicitly:
Important: Backend buckets aren't supported with IAP.
IAP isn't turned on "at the load balancer" generically — it's enabled per backend service, and only these backend types qualify:
• Instance groups (GCE MIG)
• Zonal NEGs
• Serverless NEGs (Cloud Run)
• Internet / hybrid / PSC NEGs