diff --git a/.ddev/config.yaml b/.ddev/config.yaml new file mode 100644 index 0000000..04ea48d --- /dev/null +++ b/.ddev/config.yaml @@ -0,0 +1,22 @@ +name: drupal-base +type: drupal11 +docroot: web +php_version: "8.4" +webserver_type: nginx-fpm +xdebug_enabled: false +database: + type: mariadb + version: "10.11" +composer_version: "2" +use_dns_when_possible: true +# Settings are managed by the Lagoon scaffolding (amazeeio/drupal_integrations), +# which reads the LAGOON/MARIADB_* variables below. +disable_settings_management: true +web_environment: + - LAGOON=local + - MARIADB_HOST=db + - MARIADB_PORT=3306 + - MARIADB_USERNAME=db + - MARIADB_PASSWORD=db + - MARIADB_DATABASE=db + - DRUSH_OPTIONS_URI=$DDEV_PRIMARY_URL diff --git a/README.md b/README.md index b3161d1..593314b 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,35 @@ To see similar projects with additional services, please visit https://github.co * [Lando](https://docs.lando.dev/basics/installation.html#system-requirements) +**OR** + +* [DDEV](https://ddev.readthedocs.io/en/stable/users/install/) + +## Local environment setup - DDEV + +1. Checkout the project repo: + + ```bash + git clone https://github.com/lagoon-examples/drupal-base.git drupal-base && cd $_ + ``` + +2. Start DDEV and install dependencies: + + ```bash + ddev start + ddev composer install + ``` + +3. Install your Drupal site with Drush: + + ```bash + ddev drush si -y + ``` + +4. Visit the new site with `ddev launch` + +DDEV reuses the Lagoon settings scaffolding — the database connection is provided via `LAGOON`/`MARIADB_*` environment variables in `.ddev/config.yaml`, so no extra settings files are needed. + ## Local environment setup - pygmy- 1. Checkout this project repo and confirm the path is in Docker's file sharing config - https://docs.docker.com/docker-for-mac/#file-sharing