Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caching source packages stored on local git server #389

Closed
fduch opened this issue Feb 14, 2014 · 9 comments
Closed

Caching source packages stored on local git server #389

fduch opened this issue Feb 14, 2014 · 9 comments

Comments

@fduch
Copy link
Contributor

fduch commented Feb 14, 2014

Hi all!

We are using our own git server with gitweb interface to mirror public repositories and store private repositories in our company. Than we'd like to handle packages with our own local packagist instance due to big packages amount.

The main goal is to make packages cachable and to clone git repository only once during the first package installation on the "client side" (developer's machine, ci-server, etc).
In order to do this we need archive copies of tagged versions of packages and package manager that adds dist metadata (distType, distUrl, etc) to the package info.

In case of packagist it means that corresponding VCSDriver should be able to provide dist information. Nowadays there are only two drivers doing this stuff (GitBitbucketDriver, GitHubDriver), but we can't use one of them because of handling our own git server (not bitbucket, not github). It is possible to create archives of the tagged versions for the projects on the gitweb side so it would be cool if i can create custom GitWebDriver to provide packages with dist information referenced to archives prepared with gitweb on company's git server. But there is no chance to provide such custom vcs driver without patching of composer (am i right?). So than I've also tried to "pretend" our git-storage to the local packagist by a github-server (by adding the hostname of the local git server to the list of github-domains using corresponding composer option), but it was unsuccessful because of github-related url's of the packages / dist's (obviously i can write some url rewrite rules for nginx in order to translate github-styled url's into internal ones, but it is not the best idea).

I know that in case of Satis this problem is successfully solved by archive configuration directive so i eventually can place satis in front of packagist in order to cache all the packages on satis-level, but it seems to be overcharged to have both satis and packagist simultaneously installed.

So is there any chance to deal with dist packages (and cache them) in case of composer + packagist + local git server?

@stof
Copy link
Contributor

stof commented Feb 18, 2014

using the archive system in packagist is in the roadmap. So it will probably become available at some point

@fduch
Copy link
Contributor Author

fduch commented Feb 19, 2014

Thanks, @stof. Are there some common recomendations how to deal with packagist and local git server now, when archive system is not available?

@fduch
Copy link
Contributor Author

fduch commented Feb 22, 2014

@Seldaek, @naderman, any thoughts?

@lisachenko
Copy link

+1 for this issue, looking for the way to enable caching (serving dists) with custom git browser. @Seldaek could you suggest possible workarounds until archive system will be supported?

@naderman
Copy link
Member

naderman commented Mar 4, 2014

The only thing I'd currently recommend is to use satis - do you really need a full packagist setup?

@fduch
Copy link
Contributor Author

fduch commented Mar 4, 2014

Thanks, @naderman. Using packagist is preferable due to flexible user management and automated packages submitting support

@lisachenko
Copy link

@naderman agree with @fduch that satis is not well suited for enterprise. How can we add this functionality to the packagist?

@benchegg
Copy link

+1, is it anyway we can write a composer plug-in to support new VcsDriver?

@Seldaek
Copy link
Member

Seldaek commented Jul 1, 2014

For enterprise use there is now https://toranproxy.com which does things quite a lot better than satis and packagist for the typical redundancy/safety use cases.

@Seldaek Seldaek closed this as completed Jul 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants