]> cat aescling's git repositories - mastodon.git/commitdiff
NFS for shared folder requires a private_network (#1263)
authorhappycoloredbanana <happycoloredbanana@users.noreply.github.com>
Mon, 17 Apr 2017 08:40:14 +0000 (11:40 +0300)
committerEugen <eugen@zeonfederated.com>
Mon, 17 Apr 2017 08:40:14 +0000 (10:40 +0200)
Vagrantfile

index 66892e443cd05d746b8c9de2c1f6f33551c87b2a..9047037bc9359e4bdf852b5706d65abb97939208 100644 (file)
@@ -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