简体   繁体   中英

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.

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.

Usually, the repositories are in Github or 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). 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM