about summary refs log tree commit diff
path: root/Vagrantfile
diff options
context:
space:
mode:
authorhappycoloredbanana <happycoloredbanana@users.noreply.github.com>2017-04-17 11:40:14 +0300
committerEugen <eugen@zeonfederated.com>2017-04-17 10:40:14 +0200
commite22f9819bba5bbbca503a7ffddc29b681cf76344 (patch)
tree35df580c7f800e74d5ad4f3641d34e9c6e3f1f8a /Vagrantfile
parentf3b86c1bda03c799c17a508daa867c57be1c0585 (diff)
NFS for shared folder requires a private_network (#1263)
Diffstat (limited to 'Vagrantfile')
-rw-r--r--Vagrantfile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Vagrantfile b/Vagrantfile
index 66892e443..9047037bc 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -107,7 +107,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
     config.hostsupdater.remove_on_suspend = false
   end
 
-  config.vm.synced_folder ".", "/vagrant", type: "nfs", mount_options: ['rw', 'vers=3', 'tcp']
+  if config.vm.networks.any? { |type, options| type == :private_network }
+    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
   config.vm.network :forwarded_port, guest: 80, host: 3000