After deployment, is there a way to inspect the process.env
variables on a running cloud run service?
I thought they would be available in the following page:
https://console.cloud.google.com/run/detail
Is there a way to make them available here? Or to inspect it in some other way?
PS: This is a Docker container.
I have the following ENV
on my Dockerfile. And I know they are present, because everything is working as it should. But I cannot see them in the service details:
Dockerfile
ENV NODE_ENV=production
ENV PROJECT_ID=$PROJECT_ID
ENV SERVER_ENV=$SERVER_ENV
I'm using a cloudbuild.yaml
file. The ENV
directives are present in my Dockerfile
, and they are being passed to my container. Maybe I should add env
to my cloudbuild.yaml
file? Because I'm using --substitutions
on my gcloub builds sumbmit
call and they are passed as --build-arg
to my Docker build
step. But I'm not declaring them as env
in my cloudbuild.yaml
.
I followed the official documentation and set the environment variables on a Cloud Run service using the console.Then I was able to list them on the Google Cloud Console.
You can set environment variables using the Cloud Console, the gcloud command line, or a YAML file when you create a new service or deploy a new revision: