Add Cloud Run support
Signed-off-by: Tihomir Jovicic <tihomir.jovicic.develop@gmail.com>
This commit is contained in:
43
docs/programming/guides/cloudrun.md
Normal file
43
docs/programming/guides/cloudrun.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# Deploy an application to GCP Cloud Run
|
||||
|
||||
This example shows how to deploy an application to GCP Cloud Run. Read the deployment [plan](https://github.com/dagger/dagger/tree/main/examples/cloud-run-app)
|
||||
|
||||
NOTE: this example requires an EKS cluster to allow authentication with your AWS credentials; but can easily be adapter to deploy to any Kubernetes cluster.
|
||||
|
||||
Components:
|
||||
|
||||
- [Cloud Run](https://cloud.google.com/run)
|
||||
|
||||
How to run:
|
||||
|
||||
1. Initialize a new workspace
|
||||
|
||||
```sh
|
||||
cd ./cloud-run-app
|
||||
dagger init
|
||||
```
|
||||
|
||||
2. Create a new environment
|
||||
|
||||
```sh
|
||||
dagger new cloud-run-app
|
||||
cp *.cue ./.dagger/env/cloud-run-app/plan/
|
||||
```
|
||||
|
||||
3. Configure the Cloud Run service
|
||||
|
||||
```sh
|
||||
dagger input text serviceName MY_APP_NAME
|
||||
dagger input text region MY_GCP_REGION
|
||||
dagger input text image MY_GCR_IMAGE_NAME
|
||||
|
||||
dagger input text gcpConfig.project MY_GCP_PROJECT
|
||||
dagger input secret gcpConfig.serviceKey -f MY_GCP_SERVICE_KEY_FILE
|
||||
|
||||
```
|
||||
|
||||
4. Deploy!
|
||||
|
||||
```sh
|
||||
dagger up
|
||||
```
|
25
docs/reference/universe/gcp/cloudrun.md
Normal file
25
docs/reference/universe/gcp/cloudrun.md
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
sidebar_label: cloudrun
|
||||
---
|
||||
|
||||
# dagger.io/gcp/cloudrun
|
||||
|
||||
## #Deploy
|
||||
|
||||
Deploy deploys a Cloud Run service based on provided GCR image
|
||||
|
||||
### #Deploy Inputs
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------------- |:-------------: |:-------------: |
|
||||
|*config.region* | `string` |GCP region |
|
||||
|*config.project* | `string` |GCP project |
|
||||
|*config.serviceKey* | `dagger.#Secret` |GCP service key |
|
||||
|*serviceName* | `string` |service name |
|
||||
|*region* | `*"us-west2" \| string` |region to which deploy the service |
|
||||
|*image* | `string` |GCR image ref |
|
||||
|*platform* | `*"managed" \| string` |Cloud Run platform |
|
||||
|
||||
### #Deploy Outputs
|
||||
|
||||
_No output._
|
Reference in New Issue
Block a user