在持续部署中:生产代码库的文件结构是否完全重置?

发布于 2025-01-18 08:34:09 字数 213 浏览 1 评论 0原文

我想在生产代码库中有一个 .env 文件,但不希望它在 github 上。 于是我就让同事在生产服务器上通过终端访问添加文件。

我的同事告诉我,每次我们与 main 合并时,生产服务器上的整个目录结构都会重置,所以我们不能这样做?有解决这个问题的方法吗?

我认为即使在 CD 中,生产服务器也只是自动执行“git pull origin main”。

有人有什么想法吗?

I want to have a .env file in the production codebase, but do not want it on github.
So I asked my colleague to add the file through terminal access on the production server.

My colleague told me that every time we merge with main, the entire directory structure on the production server resets, so we cannot do that? Is there a work around this?

I thought even in CD the production server just does an automatic "git pull origin main".

Does anyone have any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文