Currently Untested and Highly experimental
Documenting the proof-of-concept of creating a shared composer cache (PHP) directory and npm cache directory (NodeJS).
This can be used to share the local caches of downloaded packages between multiple project stacks.
Docksal does not have a mechanism to manage user created volumes. In the event that the volume needs to be dropped, you
will need to stop all existing projects, drop/recreate the volume, and then do
fin project reset cli in all projects
that were mounting this external volume.
Run the following fin commands to create the volumes for caches:
fin docker volume create composer_cache fin docker volume create npm_cache
services: cli: volumes: - composer_cache:/home/docker/.composer/cache - npm_cache:/home/docker/.npm volumes: composer_cache: external: true npm_cache: external: true
(This is similar to how the global
docksal_ssh_agent volume is mounted in
Update the project stack:
fin project start
Was this page helpful?
Thanks for the feedback. If you have a specific, answerable question about how to use Docksal, ask it in Discussions on GitHub. Open an issue if you want to report a problem or suggest an improvement. You can also contribute changes to this page using the link in the top right corner.