Usually every new user of vagrant have this issue that why my app is slow when it's running on vagrant?
After going through various internet articles I came up with the little solution to speed up my host and guest machines for sharing the folders that they both work on.
I went to docs of vagrant and read about NFS then implemented the following steps to make my vagrant and app work a little faster.
Steps that I followed was as:
- On my local system i.e. main system I installed
$ sudo apt-get install nfs-kernel-server nfs-common portmap
- Next step go to the vagrant ssh on the app directory and install
$ sudo apt-get install nfs-common portmap
Now we will made changes to the Vagrant file and add the following
config.vm.synced_folder ".", "/vagrant", :nfs => true
NFS requires Private network, so you need to switch to it if you are not using it
config.vm.network :private_network, ip: "10.11.12.13"
After doing this much we are ready for testing this that is it working.
Just vagrant reload you will be able to figure out that is it working in your case or not.
There is a good read for the same with more stuff to test @ Click Here to Read