Hello - I’m looking for help, maybe an example, on setting up a webapp in cloud run (cpu always, minscale 1 - I need background jobs to run) that talks to a cloud sql postgres. I guess first question - Is this even a good approach on GCP?
It seems like a simple enough use case, but I’ve run into problems every step of the way
Hi, One question, what do you mean about background jobs?
Is the web app running jobs?
So, that may be an important data point in the is-this-a-good-idea question
Yeah its ok as long as you configure cloud run to use always on CPU as you mentioned
For the connection to sql its pretty straight forwards, I would use Cloud SQL Proxy: https://cloud.google.com/sql/docs/postgres/connect-run
But it is also possible to connect to the private IP of the instance by using a VPC connector