This is an update to an earlier post about working with DDEV.
One limitation was that symbolic links didn’t work with local, out-of-project file references—like when you’d have composer use a local Craft CMS plugin that's not part of the project structure:
I solved this the hard way by running a script that used fswatch to detect changes to foo-craft-plugin
and rsync them into my local project tree (my-current-project/plugin)
.
The easy way, it turns out, is to just mount that plugin directory into the container by creating .ddev/docker-compose.mounts.yaml
and mapping the local path to one in the container:
After a quick ddev restart
the volume will be mounted inside the container.
It's important to remember is that the local (Mac) filesystem doesn't know about this arrangement, so composer updates need to be initiated from inside the container.
This may not be all that new, but I’m glad I finally stumbled onto it!