Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Cloud App Engine app.yaml for multiple environments

I currently have my app up and running, the app.yaml and dispatch.yaml are in the root of the application and I deploy through Google Cloud CLI.

This works well for the moment, though as I move to having a dev, staging and prod environment I can see that it's no longer viable.

The main issue I see is that I have to edit the variables in the app.yaml file so they are appropriate for environment (for example I use env_variables to store mysql credentials...).

I can't find anything in the docs that points to the correct way to manage this, any ideas?

Also... When deploying from a GIT repo it seems that the app.yaml needs to be in the repo, is this correct? It doesn't seem right to me... There must be a better way!

like image 351
nick Avatar asked Mar 30 '17 13:03

nick


1 Answers

You can use a configuration file or datastore settings to keep track of this environment information. At minute 26 in this talk I give some examples of how to customize your environment without needing different app.yaml files.

gcloud app deploy also accepts a list of yaml files on the command line, with the default being app.yaml.

like image 198
E. Anderson Avatar answered Oct 31 '22 11:10

E. Anderson