Getting Started with DDEV

Getting Started with DDEV
Drupal Version

Step 1.

Install (OSX):  


Docker or Colima

Install DDEV

First Project:

user@users-MBP Sites % mkdir gt_test
user@users-MBP Sites % cd gt_test
user@users-MBP gt_test % ddev config
Creating a new ddev project config in the current directory (/Users/user/Sites/gt_test) 
Once completed, your configuration will be written to /Users/user/Sites/gt_test/.ddev/config.yaml

Project name (gt_test): gt

The docroot is the directory from which your site is served.
This is a relative path from your project root at /Users/user/Sites/gt_test 
You may leave this value blank if your site files are in the project root 
Docroot Location (current directory): web
Warning: the provided docroot at /Users/user/Sites/gt_test/web does not currently exist. 
Create docroot at /Users/user/Sites/gt_test/web? [Y/n] (yes): y
Created docroot at /Users/user/Sites/gt_test/web. 
Found a php codebase at /Users/user/Sites/gt_test/web. 
Project Type [backdrop, craftcms, drupal10, drupal6, drupal7, drupal8, drupal9, laravel, magento, magento2, php, shopware6, typo3, wordpress] (php): drupal9
No settings.php file exists, creating one 
Configuration complete. You may now run 'ddev start'. 
user@users-MBP gt_test %

user@users-MBP gt_test % ddev start

Starting gt... 
Network ddev-gt_default  Created 
Container ddev-gt-dba  Started 
Container ddev-gt-db  Started 
Container ddev-gt-web  Started 
Container ddev-router  Running 
Successfully started gt 
Project can be reached at 
user@users-MBP gt_test %

Edit the DDEV Config:  .ddev/config.yaml ()

additional_hostnames: []
additional_fqdns: []
 type: mariadb
 version: "10.4"

Changes additonal hostnames to allow GT SSO:



Composer: Install Drupal:

ddev composer install

Copy your existing composer.json to the root folder. ( I found -W and --ignore-platform-reqs fixes my local composer issues)

composer update -W --ignore-platform-reqs

Adding modules with composer: --no-update adds it to composer.json but waits for update command.

composer require 'drupal/ckeditor:^1.0' --no-update

Import a Drupal database:

ddev import-db --src=mypleskdrupal.sql

Updating a database/Drush commands:

ddev drush updatedb -vvv

Export a Drupal Database:

ddev export-db -f mypleskdrupal10.db.sql.gz