Git - 让生产/登台服务器在推送到主存储库后自动更新

发布于 2024-10-05 10:26:02 字数 726 浏览 2 评论 0原文

我有以下设置,其中生产运行在 Windows Server 2003/2008 上。 Master(LAMP 局域网服务器)和 Production(WAMP 远程服务器)可以通过安全 VPN 连接进行通信。

https://i.sstatic.net/CgD4a.png

本地存储库推送到主分支,主存储库应推送到生产或生产应被触发以从主存储库更新(裸存储库、黄金分支或您喜欢的称呼方式)。

我是否需要在生产上设置一个可推送的远程存储库,在满足某些条件后,主存储库通过后推挂钩推送到该存储库?

需要使用更新的附加信息

  • - 由于存储库的大小,不可能对每个版本进行完整克隆/导出,
  • 没有 ruby​​ 意味着没有 capistrano
  • phpundercontrol 也只是通过 (s)ftp 克隆/导出/复制整个项目,这不是对我来说,有一个 X GB 存储库的选项
  • 整个工作流程看起来与 nvies git 分支模型非常相似(无法发布 url,感谢垃圾邮件防护...)
  • Git 推送到生产环境 (FTP) 可能是令人讨厌的解决方案...

I have the following Setup, where Production is running on Windows Server 2003/2008. Master (LAMP lan server) and Production (WAMP remote server) can communicate via a secure VPN-connection.

https://i.sstatic.net/CgD4a.png

After a Local Repo pushes to the Master Branch, the Master Repo should push to Production or Production should be triggered to update from Master Repo (bare repo, gold branch or how you like to call it).

Do I need to setup a pushable remote repo on Production, to which the master repo pushes via a post push hook, after some criterias are hit?

additional information

  • need to use update - a full clone/export for every release is not possible due to the size of the repo
  • no ruby means no capistrano
  • phpundercontrol also just clones/export/copys the whole project via (s)ftp which isn't a option for me with a X GB repo
  • the whole workflow looks pretty simlilar to nvies git branching model (cannot post url, thx spam protection...)
  • Git Push into Production (FTP) could be nasty solution...

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

百思不得你姐 2024-10-12 10:26:02

只需添加一个帖子接收挂钩即可。是的,您想要一个生产环境的克隆。

Just add a post receive hook. Yes, you want a clone on production.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文