"The app.yaml file must be located in your application's root directory. 
You may check this detail and general app.yaml-related information on the 
"Configuring your App with app.yaml" documentation page 
<https://cloud.google.com/appengine/docs/flexible/python/configuring-your-app-with-app-yaml#intro>.
 
This means that the ./config/dev/ directory, where app.yaml is saved, must 
be regarded as the root directory: you should copy all your app's other 
directories and files accordingly, to dev, from your home directory, or 
where stored initially. Once this file copy succeeds, and your app 
directories are placed under the root "dev" directory, the "gcloud app 
deploy ./config/dev/app.yaml" command should succeed, as expected."

Or alternatively you could have multiple "app.yaml" files in the root 
directory, and just change the name of each file as well as provide the 
service flag. For example, app.yaml can be the default service, dev.yaml 
can be the dev service, and stage.yaml can be the stage service (the name 
of the file doesn't have to be "app"). Then you can just do `gcloud app 
deploy app.yaml` or `gcloud app deploy dev.yaml`, etc.

The parameters of `gcloud app deploy` is actually an array of 
"deployables", meaning you can update multiple services at the same time. 
So if you wanted to update all environments, you can do `gcloud app deploy 
dev.yaml stage.yaml app.yaml` if you wanted.



On Tuesday, April 10, 2018 at 11:45:37 AM UTC-4, Raunak Gupta wrote:
>
> I've multiple services running for the same app under the name "dev",  
> "stage" and "default" (which is prod). 
>
> The deployment is done using the standard `gcloud app deploy app.yaml`.
>
> It is frustrating having to update app.yaml with service name before each 
> deployment. I tried overcoming this by creating multiple app.yaml file for 
> each environment. As an example, for dev, the `app.yaml` file would be 
> stored under ./config/dev/app.yaml'. But now when I deploy using `gcloud 
> app deploy ./config/dev/app.yaml`, gcloud only uploads what is in the 
> /config/dev directory (and nothing from home directory). 
>
> Is there a way to change this behaviour, or an alternative way to manage 
> multiple environments better?
>
> Thanks! 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/d66fd7f3-f183-4359-9303-688fcf4ad2d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to