[英]Private Composer repositories in production, what is the best way to go?
I have a few repositories based on Composer, that I use in a lot of projects that me and my team work on. 我有一些基于Composer的存储库,可用于我和我的团队从事的许多项目。
But, I have a lot of different production servers, and when I need to put my application in production, I need to put the server public key in my private git repositories, in order to the server be able to download the code. 但是,我有很多不同的生产服务器,当我需要将应用程序投入生产时,需要将服务器公钥放入我的私有git存储库中,以便服务器能够下载代码。
Usually, the repositories are in Github or Bitbucket. 通常,存储库位于Github或Bitbucket中。
Is there a better way to manage this? 有没有更好的方法来解决这个问题?
I prefer to push code out to the server instead of having it fetch it. 我更喜欢将代码推送到服务器,而不是将其获取 。 I typically use Capistrano for that (but there are many similar tools).
我通常为此使用Capistrano (但是有许多类似的工具)。 Sometimes this just means copying the latest checkout, sometimes the process is customized with a build step in which necessary things are compiled, packaged or otherwise prepared for production.
有时,这仅意味着复制最新的结帐;有时,该过程是通过构建步骤自定义的,在该步骤中,将必要的内容进行编译,打包或准备用于生产。
This way all you need is for your server to be accessible via SSH, all your repositories need only be accessible by your workstation which pushes the release. 这样,您所需要做的就是使服务器可以通过SSH进行访问,而您的所有存储库只需要由推动发行版的工作站访问即可。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.