如何从gcloud部署中排除文件? [英] How can I exclude a file from deploy in gcloud?

查看:72
本文介绍了如何从gcloud部署中排除文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经构建了一个Node.js应用程序,我要做的是将cd部署到我的项目目录中并运行gcloud preview app deploy.这可行,但是在文件中我还有一个JSON文件,其作用类似于我的应用程序的数据库,我不想在部署时在站点上对其进行更新.我似乎找不到任何方法.如果不可能的话,能够远程查看JSON文件并将其数据复制到本地文件,然后部署所有内容也可以解决我的问题,但是我似乎也无法做到这一点.

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. If it's not possible, being able to see the JSON file remotely and copy its data to the local one and then deploy everything would do me too, but I cannot seem to be able to do that either.

推荐答案

我相信您会希望使用

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.

类似的东西:

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

这篇关于如何从gcloud部署中排除文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆