Skip to content

Commit

Permalink
Merge pull request #110 from albeorte96/2.x
Browse files Browse the repository at this point in the history
-    MAKEFILE - Consistence between all setup commands
-    Rename Behat default features as examples
-    Expand documentation in case you do not want minimal Drupal
-    Replace unnecessary drush alias
-    Remove ci split no longer used
  • Loading branch information
omarlopesino committed Mar 23, 2023
2 parents fb8b2be + 8d269ea commit 6c3e027
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 15 deletions.
14 changes: 5 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -58,9 +54,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
Expand All @@ -73,7 +69,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
Expand All @@ -82,7 +78,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.
Expand Down
6 changes: 1 addition & 5 deletions drush/sites/sitename.site.yml.example
Original file line number Diff line number Diff line change
@@ -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'

Expand Down
11 changes: 11 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,18 @@ 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 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.

Example:

```
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
Expand Down
1 change: 0 additions & 1 deletion web/sites/default/example.settings.local.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6c3e027

Please sign in to comment.