简体   繁体   English

生产中的Private Composer存储库,最好的方法是什么?

[英]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.

相关问题 Composer下载私有GitHub存储库 - Composer to download private GitHub repositories composer:有没有办法为包存储库指定首选项顺序? - composer : is there a way to specify a preference order for package repositories? 使用composer和assets为symfony项目包含jQuery的最佳方法是什么 - What is the best way to include jQuery for symfony project using composer and assets 使用composer开发库的最佳方法是什么? - What's the best way to develop a library using composer? 在项目中编辑自己的作曲家依赖项的最佳方法是什么? - What is the best way to edit your own composer dependencies in a project? 使用PHP与私有Composer存储库的AWS Elastic Beanstalk - AWS Elastic Beanstalk using PHP with Private Composer Repositories 具有同一服务器唯一配置项的Composer私有git存储库 - Composer private git repositories with unique configuration item for the same server CloudControl:如何在映像构建过程中使用Composer安装私有存储库? - Cloudcontrol: how to install private repositories with composer during image build process? PHP Composer 全局配置私有仓库 URL 列表 - PHP Composer Global Configuration Private Repositories URL List 在生产服务器上使用subversion使文件生效的最佳方法是什么? - What is the best way to make files live using subversion on a production server?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM