Home > Net >  Google Cloud SDK is trying to upload itself to app engine
Google Cloud SDK is trying to upload itself to app engine

Time:01-04

I have been working on a website and I decieded to use google app engine to host it. I have been able use the config file to try and deploy with no errors in the config. I am using the google cloud SDK to upload and deploy my files. Whenever I try to deploy the SDK says it is uploading 30,000 files. I only have 11 files I need to upload. I think the SDK is trying to upload itself to cloud storage. My website files are in a www subfolder under my public directory where the SDK is installed. On my old computer I was able to move all the SDK files to my home directory and use my public folder as the sourse. When I try to do that now it says gcloud is not found. I am using gcloud app deploy and running windows 11. My old computer was running windows 10. I am not sure if that matters. I am also not sure if I need to specify anything in my app.yaml file. If anyone could help that would be great. This is my app.yaml file:

 runtime: php74

handlers:
- url: /www/index.html
 static_files: /www/index.html
 upload: /www/index.html, /www/campsite-form-results.php, /www/contact_us.php

This is the command line screenshot: SDK screenshot. Plese let me know if there is any other information need to add.

CodePudding user response:

This is expected since gcloud will upload everything that is in the path where is the app.yaml file.

I suspect that C:/Users/evanh/public contains a lot of things (even hidden folders) and not only your files for the app.

Create a new folder and put there your code, then try to deploy the app from that new folder.


EDIT

Since this was the accepted answer I'm editing this to include Jhon's suggestion using his answer:


As a good practice, create a .gcloudignore file and specify what you do not want uploaded. You can see more info here:

gcloud topic gcloudignore

Ignoring files

CodePudding user response:

Create a .gcloudignore file and specify what you do not want uploaded otherwise everything is uploaded.

gcloud topic gcloudignore

Ignoring files

  •  Tags:  
  • Related