How can I exclude a file from deploy in gcloud?

后端 未结 3 1387
情话喂你
情话喂你 2021-01-11 13:29

I have built a Node.js app and what I do to deploy is cd into my project\'s directory and run gcloud preview app deploy. This works, but in the fil

3条回答
  •  自闭症患者
    2021-01-11 14:03

    There is skip_files directive in your app.yaml to exclude paths or files you do not want deployed.

    But If you are working on a node.js project you would have to use .gcloudignore file which will specify which directories to exclude.

    This .gcloudignore would prevent the upload of the node_modules/ directory and any files ending in ~:

      node_modules/
      *~
    

    Reference to documentation:
    1. https://cloud.google.com/sdk/gcloud/reference/topic/gcloudignore
    2. https://cloud.google.com/appengine/docs/standard/nodejs/config/appref (search 'skip_files')

提交回复
热议问题