Has anyone deployed Metabase with cloud run?

2.2k views Asked by At

I did research but couldn't find any "howTo" for deploying Metabase with Cloud Run on GCP, I only found Q&A the problems by deploying it.
My goal is to deploy Metabase with Cloud run and use Postgres as database. I have already deployed app by Cloud Run and have cloudbuild.yml pipeline on git that I use it for building my app I just wanna add Metabase.
Any directions or solutions?

2

There are 2 answers

2
marian.vladoi On BEST ANSWER

It is not recommended to deploy Metabase on Cloud Run because:

Computation is scoped to a request. You should only expect to be able to do computation within the scope of a request: a container instance does not have any CPU available if it is not processing a request.

Container runtime contract

Therefore you might be facing issues loading the application and database connections timeout.

I think your best option is using AppEngine Flexible.

Install Metabase on Google Cloud with Docker – App Engine

0
John On

It's very hard to use Metabase on Cloud Run. And Running it on Flexible App Engine is more expensive (~100$/month). Metabase entrypoint doing lot of processes and if Cloud Run decide to create another container instance it will display the loading metabase page so we have to do multiple manually refresh to get the new container ready.

I managed this problem by using more JVM JAVA_OPTS -Xmx4g and limit the MAX_INSTANCES to 1. I set a Cloud Scheduler task who does a get query to the metabase service base URL every 10 minutes.

With this configuration metabase will stay alive and Cloud Run will never create more than 1 container. So the refresh problem will not appear any more.

For the moment I don't have problems with this configuration but I think the best way to host metabase is to run it on Compute Engine VM.