Skip to content

Commit

Permalink
Merge remote-tracking branch 'gio/GPII-2060'
Browse files Browse the repository at this point in the history
* gio/GPII-2060:
  GPII-2060 - Bind mount node_modules in /var/tmp
  • Loading branch information
cindyli committed Nov 7, 2016
2 parents cb0862a + fa0f8de commit 2ce2d6f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Vagrantfile
Expand Up @@ -29,6 +29,13 @@ Vagrant.configure(2) do |config|
# Your working directory will be synced to /home/vagrant/sync in the VM.
config.vm.synced_folder ".", "#{app_directory}"

# Mounts node_modules in /var/tmp to work around issues in the VirtualBox shared folders
config.vm.provision "shell", run: "always", inline: <<-SHELL
sudo mkdir -p /var/tmp/#{app_name}/node_modules #{app_directory}/node_modules
sudo chown vagrant:vagrant -R /var/tmp/#{app_name}/node_modules #{app_directory}/node_modules
sudo mount -o bind /var/tmp/#{app_name}/node_modules #{app_directory}/node_modules
SHELL

# List additional directories to sync to the VM in your "Vagrantfile.local" file
# using the following format:
# config.vm.synced_folder "../path/on/your/host/os/your-project", "/home/vagrant/sync/your-project"
Expand Down

0 comments on commit 2ce2d6f

Please sign in to comment.