Posts

Showing posts with the label drush

Debug faster: a ddev and docker4drupal comparison

Image
I've started experimenting with DDEV for local development environments. It provides simple commands to quickly get you up and running compared to docker4drupal . However docker4drupal has the upper-hand when you want to restore databases into your dev environment. Its easier and faster compared to drush sqlc or DDEV commands. To enable this feature on docker4drupal, uncomment these lines in the mariadb container. Next create a folder called mariadb-init and drop your db in there then start up your container. It will pickup any files with *.sql or *.sql.gz If your container is already running you'll need to restart it. I find that its easier to destroy it and start again. docker compose stop mariadb && docker compose rm -f mariadb && docker compose up -d Tip: Ive made this easier by adding an alias called dbdb to run the above. Now if I need to debug an issue using a snapshot of production data, I can load it into the mariadb-init folder and run dbdb to start...