Run:
ddev config --project-type=drupal11 --docroot=public_html
ddev start
touch dummy.sql
ddev import-db --database crm --file dummy.sql
rm dummy.sql
ddev composer create drupal/recommended-project:^11 --no-install --no-interaction
sed -i 's/web\//public_html\//' composer.json
ddev composer installconfig --no-interaction extra.enable-patching true
ddev composer config --no-interaction extra.compile-mode all
ddev composer config --no-plugins --no-interaction allow-plugins.cweagans/composer-patches true
ddev composer config --no-plugins --no-interaction allow-plugins.civicrm/civicrm-asset-plugin true
ddev composer config --no-plugins --no-interaction allow-plugins.civicrm/composer-downloads-plugin true
ddev composer config --no-plugins --no-interaction allow-plugins.civicrm/composer-compile-plugin true
ddev composer require --no-interaction civicrm/civicrm-{core,packages,drupal-8}
ddev composer require --no-interaction civicrm/cli-tools
ddev composer require --no-interaction drush/drush
mkdir -p public_html/libraries
ln -s ../../libraries/civicrm/ public_html/libraries/civicrm
ddev composer install --no-interaction
ddev drush site:install --account-name=admin --account-pass=admin --locale=nl -y
ddev drush config:get system.site uuid | awk '{print $2}' | head -1 > site.id # Obtaining site.id for publishing site config to tst/prd
ddev describe -j | jq .raw.httpsurl | sed 's/"//g' > site.url # Obtaining site.url for installing CiviCRM
sed -i "s/# \$settings\['config_sync_directory'\] = '\/directory\/outside\/webroot';/\$settings\['config_sync_directory'\] = '..\/config\/sync';/" public_html/sites/default/settings.php
ddev exec 'export CIVICRM_L10N_BASEDIR=$PWD/public_html/sites/default/files/civicrm \
&& export CMS_URL=$(cat site.url) \
&& cd public_html \
&& cv core:install --url=$CMS_URL --db="mysql://db:db@db:3306/crm" --lang="nl_NL" -f'
ddev drush config:export
ddev launch $(ddev drush uli)
Initialize new repo.
Take care that repo directory is empty, only .git should be there.
Run:
- When the website is launched, change the password if deemed necessary
- Add .gitignore with:
.ddev/
public_html/
recipes/
vendor/
libraries/
Existing Repo:
- Clone the repo
- Verify composer.json (web root = pubclic_html)
- Run:
ddev config --project-type=drupal11 --docroot=public_html
ddev start
ddev composer install
ddev drush site:install --account-name=admin --account-pass=admin --locale=nl -y
site_id=$(cat site.id)
ddev drush config:set system.site uuid $site_id -y
sed -i "s/# \$settings\['config_sync_directory'\] = '\/directory\/outside\/webroot';/\$settings\['config_sync_directory'\] = '..\/config\/sync';/" public_html/sites/default/settings.php
ddev drush config:delete shortcut.set.default -y
nl_uuid=$(grep uuid config/sync/language.entity.nl.yml | awk '{print $2}')
ddev drush config:set language.entity.nl uuid $nl_uuid -y
ddev drush config:import -y
ddev launch $(ddev drush uli)