Super simple docker setup for Drupal sped up by docker-sync
- docker
- docker-compose
- docker-sync (http://docker-sync.io/)
gem install docker-sync
git clone [email protected]:albatrossdigital/simple-drupal-docker.git MYPROJECTcreate your repo- Search replace in folder for
REPLACEMEwithMYPROJECT cd MYPROJECTandgit clone {your drupal project} ./srcget your drupal repo- Add include to settings.php
// Include file for docker database connection. if (file_exists('/var/www/.docker/etc/settings.docker.php')) { require '/var/www/.docker/etc/settings.docker.php'; } - Download a db.sql to
./src - Spin up
docker-sync startfrom MYPROJECT, this will rsync files from ./src to the container, then watch files for further syncing docker-compose up -dstart the drupal + db containersdocker exec -it MYPROJECT_web_1 bashssh into container- Load in your db.sql
drush sqlc > use drupal > source db.sql - Now any changes made on local filesystem are rsync'd to the MYPROJECT-native-osx-sync container for quick execution