- Default Docker4Drupal stack (
.env
,docker-compose.yml
files). Can be modified, but for this configurationnginx
container is required; https://github.com/wodby/docker4drupal - Copy
docker-compose.override.yml
file from this gist to the same folder along withdocker-compose.yml
file. - Clone drupal repo into web directory.
git clone --branch 8.8.x https://git.drupalcode.org/project/drupal.git web cd web
- Run containers:
Note: Always run the containers before the tests run.
docker-compose up
- Install Drupal dependencies:
docker-compose exec php bash -c "cd web && composer install"
- Define settings.php file:
cp web/sites/default/default.settings.php web/sites/default/settings.php
- Set database connection:
cat >> web/sites/default/settings.php << EOL \$databases['default']['default'] = [ 'database' => getenv('DB_NAME'), 'username' => getenv('DB_USER'), 'password' => getenv('DB_PASSWORD'), 'host' => getenv('DB_HOST'), 'port' => '3306', 'driver' => getenv('DB_DRIVER'), ]; EOL
-
Open project directory.
-
Go to
Settings
. -
Define interpreter from docker-compose stack.
-
Configure the PHPUnit
docker-compose exec php bash -c "cd web && drush si demo_umami --account-pass=admin -y"