Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Cloud storage bucket for react and cloud run for dotnet api services

Hi,

We are trying to host frontend (react) in storage bucket and backend (dotnetapi) in cloud run. What should be best approach for this

Solved Solved
0 2 291
1 ACCEPTED SOLUTION

GCP Storage buckets do not provide a static ip endpoint or domain mapping, you'll need to create a Load balancer and configure the frontend to the bucket. You could configure an Endpoint and map to the entry page but that isn't very secure from an OpenAPI spec aspect. You could also deploy React frontend in AppEngine or cloudrun - this would depend on expected usage - I would typically do this method and pull the React pages in from a bucket or repo with a cloud build trigger.

View solution in original post

2 REPLIES 2

GCP Storage buckets do not provide a static ip endpoint or domain mapping, you'll need to create a Load balancer and configure the frontend to the bucket. You could configure an Endpoint and map to the entry page but that isn't very secure from an OpenAPI spec aspect. You could also deploy React frontend in AppEngine or cloudrun - this would depend on expected usage - I would typically do this method and pull the React pages in from a bucket or repo with a cloud build trigger.

Thank you for responding , I got an error in the process while deploying react app on storage bucket I was able to deploy but when I select location I got (PERMISSION_DENIED) The caller does not have permission