0

Have a Meteor application that I’m deploying to a custom flex environment. Deploying same built folder to multiple Google Projects. Usually a .tgz file is created in my local temp folder and then uploaded to the projects default Google bucket and extracted from there to create an App Engine version.

Usually isn’t working for me in one of the projects and instead the gcloud app deploy command is uploading 57K individual files from node_modules. This makes a process go from minutes to multiple hours (ran it over night and still not done).‘

I’ve tried reinitializing the gcloud configuration, updating gcloud components, changing the default bucket, but not working. It’s doing some sort of check to see what’s been uploaded because it’ll skip uploaded files if I kill and start again.

Dan Cramer
  • 685
  • 1
  • 9
  • 14

1 Answers1

0

An option for you to achieve that, it's to use the .gcloudignore to indicate which files you want to be uploaded, deployed, etc., or not.

As per the official documentation gcloud topic gcloudignore:

Several commands in gcloud involve uploading the contents of a directory to Google Cloud Platform to host or build. In many cases, you will not want to upload certain files (i.e., "ignore" them). If there is a file called .gcloudignore in the top-level directory to upload, the files that it specifies will be ignored.

This means that you can use this file to decide which files you want to ignore. This way, you can, for example, ignore a whole directory or more than one, so this thousand of files of your don't get uploaded.

In this below post, there are examples of how to set this file for your own usage.

Let me know if the information helped you!

gso_gabriel
  • 4,199
  • 1
  • 10
  • 22