Composer Repository Manager for selling Magento extension and offering composer installation for ordered packages
This extension works as a private Mangento 2 composer repository manager for extension developers that sell Magento 2 extensions and want to offer easy composer installation.
Using Satis the composer.json and packages will be generated and stores on the server. For every package ordered thru the webshop it checks if the ordered products are M2 packages (based on the product_id) and inserts this in the customer_packages table so that user will have access to the bought package. If there is no customer_auth key available it will be generated.
notify-batch
URL the installation of a package is recorded for the user (stores IP, Package, Version and User ID)Install Satis outside your Magento Webroot but accesable from the Magento web user:
php composer.phar create-project composer/satis --stability=dev --keep-vcs [path]
The Satis installation doesn’t need to be access from the web, it is only used to collect the composer json files and generate the downloadable files
The repository is a dedicated store within Magento. Its best to use a separate Store and Store View within the same website. For the store select an empty Root Catalog. To disable the rendering of the default Magento URL’s set the template package to composerrepo, this has an empty page.xml to disable the rendering of every page.
After installation of the extension goto: System=>Configuration=>Genmato=>Composer Repo
and complete the following fields:
[Configuration]
Repository name: This name is used for the composer config repositories.[name] command (for example: genmato)
Repository URL: The url that serves the Repository (for example: https://repo.genmato.com)
Include dev-master: Optionally enable the option to allow access to the dev-master package (disabled by default)
Update period: The period in months that user can get free updates to a newer release, when the period ends the user only has access to the versions release before. Not possible when dev-master is enabled, leave empty for unlimited updates.
[Configuration on store level]
Enabled: When enabled on store level it generates a url-rewrite to request the packages.json
[Satis Configuration]
Satis command path: Path to the Satis executable (for example: /var/www/satis/bin/satis)
Satis config path: Path to the satis.json configuration file (for example: /var/www/satis/satis.json)
Name: Repository name (used for satis.json)
Homepage URL: Repository URL (used for satis.json)
Output directory: Path the the Satis web directory (for example: /var/www/satis/web)
[Satis Archive]
Format: Export format (zip or tar) of the packages (for example: zip)
Absolute Directory: Path to where the downloaded packages should be places (for example: /var/www/satis/packages/
The Magento 2 package/extensions should be stored in a private repository, it is important that the account where Satis is running from has access to download from this repository.
Currently the backend forms are not yet ready, for now it is possible to add a package to the table genmato_composerrepo_packages
:
When the configuration and packages are ready the configration can be build with:
php -f [magento-dir]/shell/composerrepo.php -- update --store_id [store_id]
This command can also be scheduled to run daily (or any frequency you prefer) and automatically update the repository data