We have a working Drupal 9 installation (running within Docksal), which has pretty much the whole install living in docroot/
except for the config/
directory, which is a sibling of docroot/
. This application is fairly plain-vanilla–no custom modules, just some well-known contrib modules and normal config. I will refer to it herein as the “working app.”
In order to get this application onto Acquia Cloud and set up our CI/CD we hope to use their BLT utility.
We have tried several approaches to get BLT working with this application:
- Create a Docksal Drupal 9 BLT boilerplate application and attempt to use
composer install
to get the same set of modules as the working app, and
then import the working app’s configuration withfin drush cim
. - Create a Drupal 9 BLT
boilerplate application and hand-editcomposer.lock
with selections
from the working app’scomposer.lock
file, runcomposer install
, and
then import the working app’s configuration usingfin drush cim
. - Install BLT within the
working app as described here:
https://docs.acquia.com/blt/install/adding-to-project/.
Approaches 1 & 2 did not work because of incompatibilities between the BLT boilerplate app’s composer configuration requirements (minimum-stability dev
and prefer-stable true
) and those configurations in the composer.json
file of the working app. There were also version incompatibilities between the contrib modules in the working app and those which the BLT boilerplate app wanted to install. Hand editing the composer.json
file also proved equally fruitless.
Using approach 3 we got as far as installing BLT in that the blt/
directory and associated files are now present, but blt doctor
complains of a missing docroot/docroot
directory. Looking at the differences in the filesystem layout between the BLT boilerplate app and the working app made it seem like it might be worth trying to move vendor/
, sites/
, composer.json
and composer.lock
up one level from within docroot/
such that those two directories and two files are now siblings of docroot/
and seeing if that satisfies blt doctor
. Doing this of course breaks the application and makes composer unhappy. I have tried the following:
- Deleting everything in
vendor/
and runningcomposer install
- Running
composer dump-autoload
- Hand-editing
docroot/autoload.php
looking for and
attempting to edit incorrect filesystem locations within the
relocatedvendor/
directory
As you can imagine, none of the above have worked and we are just about at the end of our patience with this endeavor.
I have a few general questions:
- Are any of the three approaches above likely to result in a successful BLT install?
- With regard to approach 3, is there a generally accepted method of moving either
vendor/
,composer.*
and/or thesites/
directory as described above?
Thank you in advance for any general or specific help you can offer.
Go to Source of this post
Author Of this post: timgeek
Title Of post: Installing Acquia BLT on an existing Drupal 9 application
Author Link: {authorlink}