google-cloud-run

Container failed to start. Failed to start and then listen on the port defined by the PORT environment variable

那年仲夏 提交于 2020-04-13 02:57:13
问题 I built my container image, but when I try to deploy it from the gcloud command line or the Cloud Console, I get the following error: "Container failed to start. Failed to start and then listen on the port defined by the PORT environment variable." 回答1: In your code, you probably aren't listening for incoming HTTP requests, or you're listening for incoming requests on the wrong port. As documented in the Cloud Run container runtime contract, your container must listen for incoming HTTP

How to mount a bucket in a Google Run application?

风格不统一 提交于 2020-03-26 02:25:07
问题 My final goal is to mount a bucket inside a container to be deployed with google run. In order to mount a bucket, I am using gcsfuse that requires a privileged container. (https://github.com/maciekrb/gcs-fuse-sample et.al...) With a VirtualMachine I would use: gcloud compute instances create-with-container \ [...] \ --container-privileged While with google run: gcloud beta run deploy [...] But it doesn't seem to have this option. Any hint will be appreciated. 回答1: My final goal is to mount a

How Can I Obtain GCP service account credentials on Google Cloud Run?

ⅰ亾dé卋堺 提交于 2020-03-05 06:07:51
问题 This page explains both: Obtaining and providing service account credentials manually for developing local, deploying on-premises, or deploying to another public cloud. Obtaining credentials on Compute Engine, Kubernetes Engine, App Engine flexible environment, and Cloud Functions But there is no mention of obtaining credentials on Cloud Run. I'd appreciate it if you give instructions for obtaining credentials and setting firebase-admin initializeApp and firebase initializeApp for

How Can I Obtain GCP service account credentials on Google Cloud Run?

柔情痞子 提交于 2020-03-05 06:06:28
问题 This page explains both: Obtaining and providing service account credentials manually for developing local, deploying on-premises, or deploying to another public cloud. Obtaining credentials on Compute Engine, Kubernetes Engine, App Engine flexible environment, and Cloud Functions But there is no mention of obtaining credentials on Cloud Run. I'd appreciate it if you give instructions for obtaining credentials and setting firebase-admin initializeApp and firebase initializeApp for

Cloud build permission denied when deploy to cloud run with “--set-sql-instance” argument

强颜欢笑 提交于 2020-02-04 08:48:17
问题 I'm trying to configure cloud build triggers which build maven springboot project and then deploy to cloud runs. I run into a problem where it works when i don't specify the cloud sql instance to be connected with, but when I add "--set-cloudsql-instances", "${_DATABASE_CONNECTION_NAME}" as one of the args, it throws error on cloud build as follows: Step #1: ERROR: (gcloud.beta.run.deploy) PERMISSION_DENIED: The caller does not have permission Finished Step #1 ERROR ERROR: build step 1 "gcr

Cannot deploy as a service account to google cloud run

元气小坏坏 提交于 2020-02-03 23:41:07
问题 I am struggling to enable deploying to cloud run for a service account. My logic looks something like: gcloud auth activate-service-account \ cloud-run-deployer@my-project.iam.gserviceaccount.com \ --key-file=my-project-123123213.json gcloud run deploy my-project-action \ --image "gcr.io/my-project/my-project-action:dev" \ --project my-project \ --verbosity debug \ --region us-central1 \ --allow-unauthenticated \ --platform managed This fails with: HttpForbiddenError: HttpError accessing

How to run WordPress on Google Cloud Run?

喜你入骨 提交于 2020-02-02 02:44:08
问题 Google Cloud Run is new. Is it possible to run WordPress docker on it? Perhaps using gce as database for the mysql/mariadb. Can't find any discussion on this 回答1: Although I think this is possible, it's not a good use of your time to go through this exercise. Cloud Run might not be the right tool for the job. UPDATE someone blogged a tutorial about this (use at your own risk): https://medium.com/acadevmy/how-to-install-a-wordpress-site-on-google-cloud-run-828bdc0d0e96 Here are a few points to

Stackdriver-trace on Google Cloud Run failing, while working fine on localhost

ⅰ亾dé卋堺 提交于 2020-01-24 21:01:47
问题 I have a node server running on Google Cloud Run. Now I want to enable stackdriver tracing. When I run the service locally, I am able to get the traces in the GCP. However, when I run the service as Google Cloud Run, I am getting an an error: "@google-cloud/trace-agent ERROR TraceWriter#publish: Received error with status code 403 while publishing traces to cloudtrace.googleapis.com: Error: The request is missing a valid API key." I made sure that the service account has tracing agent role.

Can't decrypt property from spring cloud config or environment variable

我只是一个虾纸丫 提交于 2020-01-24 06:44:04
问题 I'm trying to get my KMS library, found here, to decrypt items from my application.yml that come from either the google cloud config server or an environment variable. In playing around I've tried a number of scenarios to get this to work. Ideally I'd like to be able to do something like: username: '{cipher}${db_username} where ${db_username} is either a property I read in from google cloud config or an environment variable. So far what I've tried: ✅ username: ${username} -> Successfully

Nginx container fails to start on Cloud Run

蓝咒 提交于 2020-01-16 19:12:41
问题 I'm attempting to serve simple static page with Nginx on Cloud Run. But the container fails to properly start serving. Container is starting, as shown by the debug lines echoed from docker-entrypoint.sh : 2019-05-26T22:19:02.340289Z testing config 2019-05-26T22:19:02.433935Z nginx: the configuration file /etc/nginx/nginx.conf syntax is ok 2019-05-26T22:19:02.434903Z nginx: configuration file /etc/nginx/nginx.conf test is successful 2019-05-26T22:19:02.436605Z starting on 8080 2019-05-26T22:19