Skip to content

Instantly share code, notes, and snippets.

@laurentlemaire
Created February 11, 2016 18:16
Show Gist options
  • Save laurentlemaire/36ac79d9a05d0f31da73 to your computer and use it in GitHub Desktop.
Save laurentlemaire/36ac79d9a05d0f31da73 to your computer and use it in GitHub Desktop.
Vagrant cache
1. Edit Vagrant file
-----------------------------------------
# Vagrantfile #65
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :machine
config.cache.synced_folder_opts = {
type: :nfs,
mount_options: ['rw', 'vers=3', 'tcp', 'nolock']
}
config.cache.enable :generic, {
"vendor" => { cache_dir: "/var/www/travelyo/vendor" },
}
end
2. Install plugin
-----------------------------------------
Command to run on host: vagrant plugin install vagrant-cachier (can take some time)
Then vagrant halt + vagrant up
3. Check guest
-----------------------------------------
Check if it worked: ls -la /var/www/travelyo, vendor should be a symlink
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment