Ben
Ben

Reputation: 5192

appengine + nodejs (or else) // environments variables outside app.yaml

The interface is pretty large, so is the doc and so far could not spot this feature clearly

Is there a place where you set environments variable "à-la-heroku" ? Or setting env vars is not available via the gcloud's console interface ?

I'm getting into gcloud running a ruby web app, the goal is, as you would on a regular server, to be able to reach those env variables with ENV["VAR_NAME"].

I'm not sure which one of appengine or cloud compute services are concerned. As I'd like to keep the setup "handled by google", I'd also like to know how to set those envs without ssh'ing into the machine

I tried by adding those in the Metadata area of the compute engine, but this is obviously not the right way to have it available

Upvotes: 3

Views: 1217

Answers (1)

Chris
Chris

Reputation: 5886

You can set environment variables in app.yaml before you deploy. The documentation for how to do so is here.

That documentation is actually for Python, but should apply equally to managed VMs.

Upvotes: 3

Related Questions