NFS for shared folder requires a private_network (#1263)

This commit is contained in:
happycoloredbanana 2017-04-17 11:40:14 +03:00 committed by Eugen
parent dd68c1cc16
commit f79a319f28

4
Vagrantfile vendored
View file

@ -107,7 +107,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.hostsupdater.remove_on_suspend = false config.hostsupdater.remove_on_suspend = false
end end
if config.vm.networks.any? { |type, options| type == :private_network }
config.vm.synced_folder ".", "/vagrant", type: "nfs", mount_options: ['rw', 'vers=3', 'tcp'] config.vm.synced_folder ".", "/vagrant", type: "nfs", mount_options: ['rw', 'vers=3', 'tcp']
else
config.vm.synced_folder ".", "/vagrant"
end
# Otherwise, you can access the site at http://localhost:3000 # Otherwise, you can access the site at http://localhost:3000
config.vm.network :forwarded_port, guest: 80, host: 3000 config.vm.network :forwarded_port, guest: 80, host: 3000