Where to deploy Angular frontend when you're using Cloud Run as your backend?

Viewed 1123

Currently, I have a Spring Web Kotlin backend running on Cloud Run.

I have an angular 8 frontend I developed (and plan to have other frontends) and I want to find out where do I deploy it, and connect to my backend.

Where in Google Cloud Platform I should serve/deploy the frontend? In another Cloud run (how do they communicate internally?) Or in a CDN?

1 Answers

You have to deploy your static code in a component that host and serve static files. You have several solution

I don't recommend you to serve your static document in Cloud Run, you will pay processing time for nothing!

For the communication between the front-end and the backend, you will have to customize CORS in your app deployed on Cloud Run for this.

Related