Manage multiple deployment profiles for Google Cloud Run
6.5K
Manage multiple deployment profiles for Google Cloud Run.
Cloud Run's cost model fits very well with multiple staging environments. For example, you might want to deploy multiple services with slightly different environmental variables (e.g. different Cloud SQL connection). Although Google offers a friendly UI, it's not very helpful when you need to manage multiple profiles within a CI/CD pipeline.
Here is an example of running two environments.
{
"name": "hello",
"image": "gcr.io/cloudrun/hello",
"platform": "managed",
"concurrency": 10,
"max-instances": 1,
"memory": "512Mi",
"region": "asia-northeast1",
"env": {
"MYSQL_USER": "local",
"MYSQL_PASSWORD": "berglas://my-bucket/mysql-password-dev"
},
"cloudsql-instances": [
"staging"
]
}
When you want to override some, but not all parameters, run-env can automatically read from other profiles using the include key.
{
"include": ["dev.json"],
"max-instances": 10,
"allow-unauthenticated": true,
"env": {
"MYSQL_USER": "production",
"MYSQL_PASSWORD": "berglas://my-bucket/mysql-password-prod"
},
"cloudsql-instances": [
"production"
]
}
Several feature that might be extra helpful:
prefix-$CIRCLE_BRANCH).MIT
Content type
Image
Digest
sha256:f4fb10d7c…
Size
489.1 MB
Last updated
22 days ago
docker pull hden/run-env