Search code examples
google-cloud-storagegoogle-cloud-platformgcloud

How can I exclude a file from deploy in gcloud?


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 files I also have a JSON file which acts like the database for my application, which I do not want updated on the site when I deploy.

I cannot seem to find any way of doing this.

Any idea?


Solution

  • I believe you will want to use the skip_files directive in your app.yaml to exclude paths or files you do not want deployed.

    Something like:

    skip_files:
      - ^your_data_dir/.*\.json?