vagrant: Add NFS backend for file synchronization for OSX.

This is intended to fix serious issues with frequent guest crashes on
OSX High Sierra with Virtualbox and the default file synchronization.

Note from Tim: We've tried this idea before, and it worked for Mac,
but caused problems for non-Mac users of our Vagrant setup that
resulted in it being reverted in
1432e9afb0.

Hopefully the new conditional will handle things correctly in both Mac
and Linux.
This commit is contained in:
Joshua Pan 2017-11-24 08:57:31 -08:00 committed by Tim Abbott
parent 0dc91a9148
commit 9e8ae68dfb
1 changed files with 6 additions and 1 deletions

5
Vagrantfile vendored
View File

@ -30,7 +30,12 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
host_ip_addr = "127.0.0.1" host_ip_addr = "127.0.0.1"
config.vm.synced_folder ".", "/vagrant", disabled: true config.vm.synced_folder ".", "/vagrant", disabled: true
if (/darwin/ =~ RUBY_PLATFORM) != nil
config.vm.synced_folder ".", "/srv/zulip", type: "nfs"
config.vm.network "private_network", type: "dhcp"
else
config.vm.synced_folder ".", "/srv/zulip" config.vm.synced_folder ".", "/srv/zulip"
end
vagrant_config_file = ENV['HOME'] + "/.zulip-vagrant-config" vagrant_config_file = ENV['HOME'] + "/.zulip-vagrant-config"
if File.file?(vagrant_config_file) if File.file?(vagrant_config_file)