The docker-compose.yml
assumes that a Drupal installation using the Composer template for Drupal projects is present in the drupal
directory within the repository:
git clone https://github.com/drupal-composer/drupal-project.git drupal
-
Build the containers for later use:
docker-compose build
-
Start the MySQL server:
docker-compose start mysql
-
Start the Apache web server:
docker-compose start apache
The Drupal site is now available at localhost:888/web on the host
-
Install Composer dependencies:
docker-compose run composer install
-
Update Composer dependencies:
docker-compose run composer update
-
Install site with Drush:
docker-compose run php ../vendor/bin/drush site-install --db-url=mysql://root:root@mysql/drupal
-
Rebuild caches with Drush:
docker-compose run php ../vendor/bin/drush cache-rebuild