Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the ideal way to set up multiple environments (eg. dev, stage and prod) for Google Cloud Run applications? [closed]

I've got a sample app up and running on Google Cloud Run, complete with CD from GitHub using Cloud Build et al. I would like to have different branches deploy to different environments (dev, stage prod, etc.), however the documentation doesn't hint at any sort of setup like this.

The simplest way I can think of would be to set up separate Cloud Runs with Cloud Build triggers on different branch RegExes, but I'm wondering if there is a more elegant solution as this still feels like a very "manual" method of achieving what I want.

I found one answer (How to get Cloud Run to handle multiple simultaneous deployments?) which confirms that this is a practice that has been followed, but I just want to confirm if that's indeed the best way or if there's anything better provided by GCP for this purpose.

I'm new to Google Cloud Run as well as the overall Google Cloud Platform in general.

like image 676
aalaap Avatar asked Nov 06 '22 05:11

aalaap


1 Answers

I decided to go with separate Cloud Run instances as per my initial thoughts.

Since part of my reasoning for using Cloud Run is to modernize legacy Laravel applications, this approach should work out fine.

As mentioned by the commenters, this a subjective topic, so YMMV.

like image 189
aalaap Avatar answered Dec 07 '22 01:12

aalaap