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

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

问题描述

我已经构建了一个 Node.js 应用程序,我要做的是将 cd 部署到我的项目目录中并运行 gcloud preview app deploy.这可行,但在文件中我还有一个 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.

有什么想法吗?

推荐答案

相信你会想用 skip_files 指令在您的 app.yaml 中排除您不想部署的路径或文件.

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天全站免登陆