Disclaimer: After doing some research and digging into issues with the initial setup for Docksal and BLT I have created this walkthrough about to get a Drupal project setup
- Create your project by running the following command below. If you run into any errors, such as,
Fatal error: Allowed memory size of 1610612736 bytes exhausted
then you should proceed to Overriding PHP web settings before proceeding to step 2.
fin run-cli composer create-project --no-interaction acquia/blt-project project-name
cd project-name
The following commands should all be run from within your project root
-
Initialize your project containers:
fin project start
-
Configure BLT to work with Docksal. Open
blt/blt.yml
and update/add the following items:
project:
machine_name: project-name
local:
hostname: '${env.VIRTUAL_HOST}'
drupal:
db:
database: default
username: user
password: user
host: db
port: 3306
- Since BLT comes with pre-configured settings you will need to delete the following files (they will be auto-generated again later with the proper settings from above).
docroot/sites/default/settings/local.settings.php
docroot/sites/default/local.drush.yml
-
Add the BLT addon to Docksal so that we can run
blt
commands. Runfin addon install blt
. -
Run the following commands:
fin blt blt:init:settings
fin blt drupal:install
- Begin development. You can visit your site at
http://project-name.docksal
.
Inside your project root do the following:
-
Create the following folder structure:
.docksal/etc/php/
-
Add
php.ini
inside thephp
folder. (The CLI will be looking in this directory for PHP settings). Add the following contents to the file.
; PHP settings
[php]
; Maximum amount of memory a script may consume
memory_limit = 1024M
max_input_vars = 1000
-
Run
fin restart cli
-
Run
composer install
to complete the create project build steps.