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 MYPROJECT
create your repo- Search replace in folder for
REPLACEME
withMYPROJECT
cd MYPROJECT
andgit clone {your drupal project} ./src
get 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 start
from MYPROJECT, this will rsync files from ./src to the container, then watch files for further syncing docker-compose up -d
start the drupal + db containersdocker exec -it MYPROJECT_web_1 bash
ssh 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