Oleksandr Mosur
Oleksandr Mosur

Reputation: 1228

Composer satis, time to build private packages

I have many private repositories at Bitbucket, there are about 100 repo's (+/-). Time to build them by php bin/satis build takes a long time, somewhere about 3 minutes. How can i refresh one repository or optimize time of building. Because i saw some satis configuration, where config.json file contain more than 4000 repositories. I can not imagine how many time need to build all of this.

Upvotes: 2

Views: 1312

Answers (1)

Jens A. Koch
Jens A. Koch

Reputation: 41766

The more private repos you have, the longer Satis will need to build the static archive.

  • reduce the number of packages, if possible
  • configure Satis to provide only some and not all versions of a repo
    • switch from "require-all": true to manually listing the repos and specific versions (beware: this is tedious to maintain, but fast)
  • configure Satis to maybe skip-dev, when generating archives (to skip branches)
  • do you need archives at all or only source? if only source, disable archive generation
  • add Satis to a cronjob, the first run takes a while, after that the cache is used
  • with repo count of 100+, i would suggest to setup and switch to a private Packagist server
  • Satis does not yet support "selective update of repos". It's a long standing issue / feature request, see https://github.com/composer/satis/issues/40

Upvotes: 3

Related Questions