$ gem install docker-sync
- Uncomment docker-sync volume definition in your compose file
- Replace volume for php and nginx services to docker-sync (uncomment and delete the current one)
- Start the synchronization with
docker-sync start --daemonand let docker-sync run in the background
- In a new shell run after you started docker-sync
docker-compose up -d
Now when you change your code and it will all end up in php and nginx containers.
For more information visit docker-sync project page.