From 25868d8979a9b820414fbd2879c318d8a447fb67 Mon Sep 17 00:00:00 2001 From: Alberto Ortega Date: Sat, 4 Mar 2023 07:54:19 +0100 Subject: [PATCH 1/6] MAKEFILE - Consistence between all setup commands Modify initialize setup command to "setup-init" in order to keep consistence between all setup commands: make setup-... make setup-init make setup make setup-from-environment --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 21d1beb..d2824ab 100644 --- a/Makefile +++ b/Makefile @@ -58,9 +58,9 @@ backstopjs-reference: backstopjs-test: docker-compose exec backstopjs backstop test --filter='$(filter-out $@,$(MAKECMDGOALS))' -## init-setup : Prepares the site -.PHONY: init-setup -init-setup: +## setup-init : Prepares the site +.PHONY: setup-init +setup-init: mkdir -p web/sites/default/files/behat/errors chmod u+w web/sites/${SITE} -R cp docker-compose.override.yml.dist docker-compose.override.yml @@ -73,7 +73,7 @@ init-setup: ## setup : Prepares the site and installs it using the Drupal configuration files .PHONY: setup setup: - make init-setup + make setup-init docker-compose exec -T php drush @${SITE}.local si ${PROFILE} --existing-config --sites-subdir=${SITE} -y docker-compose exec -T php drush @${SITE}.local cim -y docker-compose exec -T php drush @${SITE}.local cr @@ -82,7 +82,7 @@ setup: ## setup-from-environment : Prepares the site and loads it with data from the reference site .PHONY: setup-from-environment setup-from-environment: - make init-setup + make setup-init ./scripts/reload-local.sh --site=${SITE} --env=${ENVIRONMENT} ## solr-sync : Reload docker Solr cores from local files. From ad86f6eec99883cfcc86ccc0d012f4157c074f4b Mon Sep 17 00:00:00 2001 From: Alberto Ortega Date: Tue, 21 Mar 2023 17:02:26 +0100 Subject: [PATCH 2/6] Rename Behat default features as examples --- .../{article_access.feature => article_access.feature.example} | 0 .../{article_create.feature => article_create.feature.example} | 0 .../{article_delete.feature => article_delete.feature.example} | 0 .../{article_edit.feature => article_edit.feature.example} | 0 .../{article_view.feature => article_view.feature.example} | 0 .../content/{page_access.feature => page_access.feature.example} | 0 .../content/{page_create.feature => page_create.feature.example} | 0 .../content/{page_delete.feature => page_delete.feature.example} | 0 .../content/{page_edit.feature => page_edit.feature.example} | 0 .../content/{page_view.feature => page_view.feature.example} | 0 10 files changed, 0 insertions(+), 0 deletions(-) rename tests/behat/features/content/{article_access.feature => article_access.feature.example} (100%) rename tests/behat/features/content/{article_create.feature => article_create.feature.example} (100%) rename tests/behat/features/content/{article_delete.feature => article_delete.feature.example} (100%) rename tests/behat/features/content/{article_edit.feature => article_edit.feature.example} (100%) rename tests/behat/features/content/{article_view.feature => article_view.feature.example} (100%) rename tests/behat/features/content/{page_access.feature => page_access.feature.example} (100%) rename tests/behat/features/content/{page_create.feature => page_create.feature.example} (100%) rename tests/behat/features/content/{page_delete.feature => page_delete.feature.example} (100%) rename tests/behat/features/content/{page_edit.feature => page_edit.feature.example} (100%) rename tests/behat/features/content/{page_view.feature => page_view.feature.example} (100%) diff --git a/tests/behat/features/content/article_access.feature b/tests/behat/features/content/article_access.feature.example similarity index 100% rename from tests/behat/features/content/article_access.feature rename to tests/behat/features/content/article_access.feature.example diff --git a/tests/behat/features/content/article_create.feature b/tests/behat/features/content/article_create.feature.example similarity index 100% rename from tests/behat/features/content/article_create.feature rename to tests/behat/features/content/article_create.feature.example diff --git a/tests/behat/features/content/article_delete.feature b/tests/behat/features/content/article_delete.feature.example similarity index 100% rename from tests/behat/features/content/article_delete.feature rename to tests/behat/features/content/article_delete.feature.example diff --git a/tests/behat/features/content/article_edit.feature b/tests/behat/features/content/article_edit.feature.example similarity index 100% rename from tests/behat/features/content/article_edit.feature rename to tests/behat/features/content/article_edit.feature.example diff --git a/tests/behat/features/content/article_view.feature b/tests/behat/features/content/article_view.feature.example similarity index 100% rename from tests/behat/features/content/article_view.feature rename to tests/behat/features/content/article_view.feature.example diff --git a/tests/behat/features/content/page_access.feature b/tests/behat/features/content/page_access.feature.example similarity index 100% rename from tests/behat/features/content/page_access.feature rename to tests/behat/features/content/page_access.feature.example diff --git a/tests/behat/features/content/page_create.feature b/tests/behat/features/content/page_create.feature.example similarity index 100% rename from tests/behat/features/content/page_create.feature rename to tests/behat/features/content/page_create.feature.example diff --git a/tests/behat/features/content/page_delete.feature b/tests/behat/features/content/page_delete.feature.example similarity index 100% rename from tests/behat/features/content/page_delete.feature rename to tests/behat/features/content/page_delete.feature.example diff --git a/tests/behat/features/content/page_edit.feature b/tests/behat/features/content/page_edit.feature.example similarity index 100% rename from tests/behat/features/content/page_edit.feature rename to tests/behat/features/content/page_edit.feature.example diff --git a/tests/behat/features/content/page_view.feature b/tests/behat/features/content/page_view.feature.example similarity index 100% rename from tests/behat/features/content/page_view.feature rename to tests/behat/features/content/page_view.feature.example From 1a012015576402dfec2369f255c06f8776fe6883 Mon Sep 17 00:00:00 2001 From: Alberto Ortega Date: Tue, 21 Mar 2023 17:03:12 +0100 Subject: [PATCH 3/6] Expand documentation in case you do not want minimal Drupal --- readme.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/readme.md b/readme.md index f625133..d24a2ab 100644 --- a/readme.md +++ b/readme.md @@ -58,7 +58,13 @@ Once Composer finalizes the project creation an assistant will be automatically After the assistant finished, if you have selected to install Drupal your project will be running and the assistant will print the URL to access it. +!!! NOTE + By default, drupal-boilerplate is installed with a minimal profile, if you want to have an installation with a non-empty Drupal, once the process is finished, launch the following drush command: + `drush site-install standard` + + This will install on the basis of drupal-boilerplate, a Drupal with the standard profile containing preconfigured commonly used features. + Using the standard profile disables the `make setup` command. ## FAQ From 47ebc7b830480a03a55e4903a8de5636782f2974 Mon Sep 17 00:00:00 2001 From: Alberto Ortega Date: Tue, 21 Mar 2023 17:13:24 +0100 Subject: [PATCH 4/6] Replace unnecessary drush alias --- Makefile | 4 ---- drush/sites/sitename.site.yml.example | 6 +----- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/Makefile b/Makefile index d2824ab..6e789b3 100644 --- a/Makefile +++ b/Makefile @@ -2,10 +2,6 @@ include docker.mk BEHAT ?= "vendor/bin/behat" SITE ?= "default" -# Update this with the base drush alias for your site. -# Example, if your site's drush aliases are contained into mysite.site.yml -# then the default site alias will be "mysite" -DEFAULT_SITE_ALIAS ?= "sitename" FRONTEND_BASE_PATH = "/var/www/html/web/themes/custom" PROFILE ?= "minimal" ENVIRONMENT ?= "stg" diff --git a/drush/sites/sitename.site.yml.example b/drush/sites/sitename.site.yml.example index 32857d5..50eb3a7 100644 --- a/drush/sites/sitename.site.yml.example +++ b/drush/sites/sitename.site.yml.example @@ -1,9 +1,5 @@ -docker: +local: uri: 'http://example.docker.localhost:8000' - docker: - service: php - exec: - options: --user wodby root: '/var/www/html' user: 'wodby' From 825d1752feba9456a5d0107e72955c5785222c05 Mon Sep 17 00:00:00 2001 From: Alberto Ortega Date: Tue, 21 Mar 2023 17:19:39 +0100 Subject: [PATCH 5/6] Remove ci split no longer used Currently ci and local are used as one and the same environment, so they use the same split local. --- web/sites/default/example.settings.local.php | 1 - 1 file changed, 1 deletion(-) diff --git a/web/sites/default/example.settings.local.php b/web/sites/default/example.settings.local.php index 3468bc2..6d0fb6d 100644 --- a/web/sites/default/example.settings.local.php +++ b/web/sites/default/example.settings.local.php @@ -20,7 +20,6 @@ } // Config splits. -//$config['config_split.config_split.ci']['status'] = TRUE; $config['config_split.config_split.local']['status'] = TRUE; //$config['config_split.config_split.dev']['status'] = TRUE; //$config['config_split.config_split.stg']['status'] = TRUE; From 8d269eacc9eeb8a62fbc01f874a1ac471e8407e2 Mon Sep 17 00:00:00 2001 From: Omar Mohamad - El Hassan Lopesino Date: Thu, 23 Mar 2023 10:24:28 +0100 Subject: [PATCH 6/6] Improve documentation of drush site-install Do not offer drush site-install standard as the only alternative as there are more profiles that can be installed. --- readme.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index d24a2ab..79dfa74 100644 --- a/readme.md +++ b/readme.md @@ -59,12 +59,17 @@ Once Composer finalizes the project creation an assistant will be automatically After the assistant finished, if you have selected to install Drupal your project will be running and the assistant will print the URL to access it. !!! NOTE - By default, drupal-boilerplate is installed with a minimal profile, if you want to have an installation with a non-empty Drupal, once the process is finished, launch the following drush command: + By default, drupal-boilerplate is installed with a minimal profile. If you want to install another profile, you must not install Drupal during the composer create-project installation problem, when the question 'Do you want to install Drupal?' appears. + +After that, just install the profile you need with the `drush site-install` command into the PHP container, after the project creation has finished. - `drush site-install standard` +Example: - This will install on the basis of drupal-boilerplate, a Drupal with the standard profile containing preconfigured commonly used features. - Using the standard profile disables the `make setup` command. +``` + drush site-install standard +``` + +Please note that if you install a profile that implements the hook_install the `make setup` command won't work as it makes a installation from configuration, and those installations requires the hook install to not be present. ## FAQ