Best practices for building Web sites in the Drupal framework (for major versions 8 and above) dictate that codebases should be built with the Composer package manager for PHP. That is, the code repository for any sites relying on it should not contain any upstream code; it should only contain a makefile with instructions for assembing it.
However, there are some prominent Drupal hosting companies that don’t support Composer natively. That is, after receiving updates to Composer-controlled Git repositories, they don’t automatically rebuild the codebase, which should result in changes to the deployed code.
If you’re hosting your site(s) at one of these companies, and you have this problem, why not consider the obvious alternative?
Aegir, the one-and-only open-source hosting system for Drupal that’s been around for over 10 years, has had native Composer support for over 2 years. That is, on each and every platform deployment (“platform” is Aegir-speak for a Drupal codebase), Aegir reassembles the upstream code assets by running the following automatically:
composer create-project --no-dev --no-interaction --no-progress
As a result, any sites created on that platform (or migrated/upgraded to it) will have access to all of the assets built by Composer.
Additionally, Aegir now ships with the Aegir Deploy module, which enhances the platform creation process. It allows for the following types of deployment:
- Drush Makefile deployment
- Pure Git
- Composer deployment from a Git repository
- Composer deployment from a Packagist repository
For more information, please read the Deployment Strategies section of the documentation.
If you’d like to get started with Aegir, the best option would be to spin up an Aegir Development VM, which allows you to run it easily, play with it, and get familiar with the concepts. Naturally, reading the documentation helps with this too.
- Installation & maintenance in corporate/enterprise (or other) environments
- Architectural and technical support
- Hosting guidance
- Conversion to best practices
The article Does your Drupal hosting company lack native Composer support? first appeared on the Consensus Enterprises blog.
We've disabled blog comments to prevent spam, but if you have questions or comments about this post, get in touch!