We have our own Satis repository, we can store there our own dependencies. This works fine.
But if a developer uses a package that is not within in our own repository, then Composer will fetch it from GitHub through packagist.org (as a fallback).
But we do not want to be dependent on packagist.org. All dependencies should be downloaded from our own repository.
What we like to know, if its possible that Satis download a package from Packagist, if it is not locally available yet, and then store it and add it to Satis own repository automatically .
This way we do not have to manually add the dependencies to the Satis repository.
Satis now supports this.
Just follow the Satis setup instructions and add the following to your configuration file (which is named satis.json by default). Update prefix-url and require as appropriate.
Then, you can create your Satis repository like normal:
Now, your Satis repository will satisfy all of your application's dependencies.
Note: the first run might take a while. Subsequent runs are much faster. Also, note that Satis uses /tmp for its cache. On a small memory system where /tmp is backed by tmpfs, you might need to increase the space /tmp has available if you have a large dependency tree.
You might also want to disable the Packagist repository in your project's composer.json file to enforce that all dependencies come from your Satis repository. To do this, add:
to your project's composer.json.