Here are some simple steps to set up a ne installation of Drupal with CiviCRM
first, set up a drupal site:
composer create-project drupal/recommended-project myproject
then add a civicrm database to settings
$databases['civicrm']['default'] = array (
'database' => 'myproject_civi',
'username' => 'dbusername',
'password' => '*******',
'prefix' => '',
'host' => 'localhost',
'port' => '3306',
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
'driver' => 'mysql',
);
then require and enable the tools and the CiviCRM module
cd /var/www/d10.example.org
composer config extra.enable-patching true
composer require civicrm/civicrm-{core,packages,drupal-8}
composer require civicrm/cli-tools
composer config extra.enable-patching true
composer config minimum-stability dev
composer require civicrm/civicrm-{core,packages,drupal-8}:'~5.42'
composer civicrm:publish
more info here:
https://docs.civicrm.org/installation/en/latest/drupal/
Add this to the extra section in composer.json
"extra": {
"civicrm-asset": {
"path": "public_html/libraries/civicrm",
"url": "/libraries/civicrm"
},
"drupal-scaffold": {
"locations": {
"web-root": "public_html/"
}
},
Set up Cron for CiviCRM
cd /home/myproject/drupal_private
GET https://download.civicrm.org/cv/cv.phar > cv.phar
then the cron command should be this
/usr/local/bin/ea-php81 /home/myproject/vendor/bin/cv api job.execute --user=my_civicron --cwd=/home/myproject/public_html