I'm using "Google App Engine" from GCP to host a static website. I already created the website files (HTML, JS) and yaml using Visual Studio Code. I have the folder with those files stored locally in my local computer.
I downloaded the Cloud SDK Shell for Windows. I logged in to my account, and selected the project. According to videos and tutorials, I need to deploy the app using "gcloud app deploy".
However I got an error saying that an "app.yaml" file is required to deploy this directory...
I'm trying to follow this tutorial: https://cloud.google.com/appengine/docs/standard/python/getting-started/hosting-a-static-website#before_you_begin
I'm also trying to follow the steps contained in this video: https://www.youtube.com/watch?v=mlcO7nfQzSg
How do I specify the root folder where I have my "app.yaml" file?
Thanks in advance!!
I already tried with many commands and unfortunately none of them have worked
gcloud app deploy
will look at the current directory first forapp.yaml
. Generally you will change to the directory with app.yaml and your other files before deployingThe particular case in which
gcloud app deploy
works without additional arguments is for single-service applications only and only if the command is executed in the directory in which the service'sapp.yaml
configuration file exists (and has that exact name, can't use a different name).For other cases deployables can/must be specified. From
gcloud app deploy
:So apart from running the command with no arguments in the directory in which your
app.yaml
exists is to specify theapp.yaml
(with a full or relative path if needed) as a deployable:IMHO doing this is a good habit - specifying deployables is more reliable and is the only way to deploy apps with multiple services or using routing via a
dispatch.yaml
file.